Which was the first song written for Sergeant Pepper?

In August 1963 The Beatles returned to the Cavern to play what proved to be their last gig there. It proved a chaotic event with frequent power-cuts causing frequent interruptions. During one of the forced intervals, Paul McCartney calmed the crowd by playing impromptu acoustic version of an old favourite.