1. Problem 1
There are three people (Alex, Brook and Cody), one of whom is a knight, one a knave, and one a spy.
The knight always tells the truth, the knave always lies, and the spy can either lie or tell the truth.

Alex says: "Cody is a knave."
Brook says: "Alex is a knight."
Cody says: "I am the spy."

Who is the knight, who the knave, and who the spy?


2. Problem 2
There are three people (Alex, Brook and Cody), one of whom is a knight, one a knave, and one a spy.
The knight always tells the truth, the knave always lies, and the spy can either lie or tell the truth.
They are brought before a judge who wants to identify the spy.

Alex says: "I am not a spy."
Brook says: "I am a spy."
Now Cody is in fact the spy. The judge asks him: "Is Brook really a spy?"

Can Cody give an answer so that he doesn't convict himself as a spy?

other