## 42. The Appearance of the First Spy

- As I have already told you, - began the King, - in that distant country, knights always spoke the truth and never lied, while liars always lied and never told the truth. One day, the entire population of the country was in extraordinary excitement: it became known that a spy from another country had infiltrated the country.
- And how did they find out? - asked Alice, forgetting her resolution not to interrupt the King with trivialities.

![](https://cdn.mathpix.com/cropped/2024_05_21_5afa4e43618f5800e92dg-062.jpg?height=546&width=629&top_left_y=1383&top_left_x=722)

- I have no idea, - replied the King, - besides, it has no bearing whatsoever on the problem!
- And did the spy lie or tell the truth? - asked Alice.
- That's the whole point, the spy was neither a knight nor a liar. Sometimes he told the truth, and sometimes he lied, depending on what was more convenient for him.

It became known that the spy had settled with two native residents of the country, one of whom was a knight, and the other a liar. All three were arrested on the same day, but who was the knight, who was the liar, and who was the spy was unknown to anyone, so we can confidently denote them with the Latin letters $A, B$, and $C$.

During the interrogation, $A$ stated that $C$ was a liar, and $C$ stated that $A$ was a knight. When directly asked, "Who are you?" - $C$ answered that he was the spy.

So, who among the three is the spy, who is the knight, and who is the liar?
42. The appearance of the first spy. $C$ cannot be a knight by definition, as no knight would lie and claim to be a spy. Therefore, $C$ is either a liar or a spy. Suppose $C$ is a spy. Then $A$'s statement is false, so $A$ is a spy (but $A$ cannot be a spy since $C$ is the spy), and the only one who can be a knight is $B$. But if $B$ is a knight, how could he have given a false statement, claiming that $A$ is a knight? Therefore, the assumption that $C$ is a spy leads to a contradiction. Hence, $C$ must be a liar. Then $B$'s statement is false, so $B$ is either a liar or a spy. But since $B$ is a liar, the spy must be $A$. Therefore, $A$ can only be a knight.

Thus, $\boldsymbol{A}$ is a knight, $B$ is a spy, and $C$ is a liar.