The path to success is never easy—even for the world’s top leaders. In fact, for Google CEO Sundar Pichai there were times he felt that stinging feeling that other people in the room were better than him. But he assures Gen Z that feelings of discomfort are all part of the process.

“At various points in my life, I’ve worked with people who I felt were better than me,” Pichai recently told Lex Fridman’s podcast. “You want that feeling a few times, trying to get yourself in a position where you’re working with people who you feel are kind of like stretching your abilities, is what helps you grow.

“Putting yourself in uncomfortable situations, and I think often you’ll surprise yourself,” he added.

For Pichai, this mantra has helped him climb the ranks at the tech giant after starting out as just a product manager in 2004. Within a decade, he had caught the eye of cofounders Larry Page and Sergey Brin before being named CEO in 2015. And while he admits there is always an element of luck to success, he encourages Gen Z to do what they love—even if it seems irrational at first.

“You’re thinking about what you want to do, your brain is telling you something. But when you do things, I think it’s important to listen to your heart, and see whether you actually enjoy doing it.”