The writing and recording of "Hey Jude" coincided with a period of upheaval in the Beatles. The ballad evolved from "Hey Jules", a song McCartney wrote to comfort John Lennon's son, Julian, after Lennon had left his wife for the Japanese artist Yoko Ono. The lyrics espouse a positive outlook on a sad situation, while also encouraging "Jude" to pursue his opportunities to find love. After the fourth verse, the song shifts to a coda featuring a "Na-na-na na" refrain that lasts for over four minutes.