A huge investigation was put forth, and across the land the knights of the king searched high and low for the tarts. Fortunately, they were discovered on a beach, just moments before being devoured by the Gryphon and the Mock Turtle. Both were brought to trial before the King. In the course of the subsequent investigation, it was determined that one of them had stolen the tarts, but not both of them.
At the trial, the following witnesses came forward to make statements:
Duchess: The Gryphon never stole the tarts!
Cook: But he had stolen things in the past.
Cheshire Cat: Well, the Mock Turtle has stolen things in the past.
Catarpillar: The Cheshire Cat has stolen things in the past!
March Hare: The Cook and the Cheshire Cat are both right.
Dormouse: The Cook and the Caterpillar are both right.
Mad Hatter: Either the Cheshire Cat or the Caterpillar is right, and maybe both.
Bill the Lizard: Either the March Hare or the Dormouse is right, and maybe both.
Knave of Hearts: The Cook and the Mad Hatter are both right.
The White Rabbit: Bill the Lizard is right, and the Knave of Hearts is wrong!
There was dead silence as everyone tried to puzzle through all of the statements. The Queen, growing frustrated, was just about to order everyone's head cut off, when Alice stood up.
Alice: It just so happens that the White Rabbit and the Duchess are either both telling the truth or both lying.
Now, since we know that Alice never tells a lie, can you work out who stole the tarts?
Adapted from Raymond Smullyan's Alice in Puzzleland