Stephen Colbert had a surprise guest last night — presidential hopeful Hillary Clinton, who magically appeared to rescue her book from Colbert's complaints about all the name dropping she did in its 600-plus pages.

However, Colbert left plenty of hints before the show that Clinton would be stopping by.

And if you still hadn't connected the dots at that point, he had one more joke to spoil the surprise.

When Clinton walked through the door, the audience, usually reverent for Colbert alone, started to yell, "Hillary, Hillary." Colbert then proceeded to remind them that they had been chanting his name only four minutes earlier, "you two-timers."

Former U.S. Secretary of State Hillary Rodham Clinton gestures while speaking to host Jon Stewart during a taping of "The Daily Show with Jon Stewart," Tuesday, July 15, 2014, in New York. (AP Photo/Frank Franklin II)

The interview began with a namedrop-off (Hillary won, because it turns out she has met Bill Clinton too) and ended with Clinton finding common ground between 100 duck-size horses and 1 horse-sized ducks — after forming alliances with the pigs and geese.

Her arrival may have been a surprise for the audience, but Clinton clearly had plenty of time to prepare — it was a near flawless, witty back-and-forth with Colbert, the kind of appearance that those featured on "Better Know a District" can only dream of.

Hillary Clinton went on The Daily Show to promote her book in June.