5. Seven people stood in a circle, each of whom is either a knight, who always tells the truth, or a liar, who always lies, or a traveler, who alternates between truth and lies.

The first and second said in unison: "Among us there is exactly 1 liar," the second and third: "Among us there are exactly 2 knights," the third and fourth: "Among us there are exactly 3 liars," $\vdots$

the sixth and seventh: "Among us there are exactly 6 knights," the seventh and first: "Among us there are exactly 7 liars."

Who is who among them?
Solution. If all 7 statements are lies, then everyone lied, meaning everyone is a liar, and then 7 and 1 told the truth. This means that at least one statement is true. On the other hand, there are no more than 2 true statements (one about the liars, the other about the knights). That is, there are either 0 or 1 knights, but the latter is impossible, since everyone said there are more than 1 knight. Therefore, there are no knights, but someone told the truth. This means the statement about the liars was true, and it was told by two visitors. Hence, 5 and 6 are visitors, and all others are liars.