On the SS Madame de Pompadour in the 51st century, the Tenth Doctor has returned from a party in 18th centuryFrance where he is irritated to find that his humancompanionsRose Tyler and Mickey Smith have yet again wandered off, confiding his frustrations with Arthur the horse. His attention, however, is soon drawn to a rip in time, distinct from the time windows on the ship. From the rip, a humanoidhand is seen to emerge from a figure who asks for the Doctor to "grab on" as they "can't hold..." before quickly shattering as the rip closes. Bewildered by what has just occurred, the Doctor determines it to be "not good" but notes that it is something which needs to wait as he hears from a distance that his companions are at the mercy of the Clockwork Droids, promptly rushing off to rescue them.
Part two
During the events of The Power of Three, when the Eleventh Doctor is bored and try to kill time by doing anything, he is put in contact with the portal but doesn't notice it as it appears in his back. The portal soon disappears like the last time and the Doctor continues his life as if nothing happened.
Part three
On the Mondasian Colony Ship, during the events of World Enough and Time, The Twelfth Doctor, Missy and Nardole take the elevator to join Bill and save her, but this portal reappears and the Doctor remembers it from the SS Madame de Pompadour. After scanning it with his screwdriver, he asks Missy if she wants to save Bill or the person that wants to reach them with the portal. Missy answers that she wants to save Bill as she is the one that is afraid of her. The Doctor stores his screwdriver back inside of his pocket and they go to save Bill. The portal will wait.
Missy remarks that there's something about lifts "that just makes you want to pull out the ribs of those around you one by one", which she refers to as an "arts and crafts project".
The Twelfth Doctor remembers seeing the hand reaching through a portal on another ship where time was "out of sorts". Ironically, the same incarnation of the Doctor is not able to remember the spaceship in Deep Breath, 3 series earlier.
Notes
The first issue of this story takes place during TV: The Girl in the Fireplace. Rose and Mickey don't appear directly. However, speech bubbles belonging to them can be seen.
According to one account, the Master had the appearance of Roger Delgado while on Gallifrey. According to another, he had Anthony Ainley's likeness. According to another one, the one with James Dreyfus's appearance was the incarnation who ran away from Gallifrey.
While fighting to extend his life at the end of his regeneration cycle, many bodies were possessed by the Beevers incarnation, but all kept somehow reverting to his real being until he finally regenerated into the MacQueen one. Hence, these sections cannot be strictly chronological