On the album "Abbey Road", the song is linked with the previous song "Mean Mr. Mustard" musically, as the two run together without pause. The two songs are also linked narratively, since "Mean Mr. Mustard" mentions that the title character Mustard has a sister named Pam. Originally, the line "his sister Pam ..." in the song was "his sister Shirley ...", but Lennon would change the line to contribute to the continuity of the "Abbey Road" side two medley. The song "Her Majesty" was originally set between "Mean Mr. Mustard" and "Polythene Pam". "Polythene Pam" then segues into the following song, "She Came In Through the Bathroom Window".