Task 2. On the island, every resident is either a knight (always tells the truth), a liar (always lies), or a commoner (can either tell the truth or lie). Knights are considered to be of the highest rank, commoners are of medium rank, and liars are of the lowest rank. A, B, and C are residents of this island. One of them is a knight, another is a liar, and the third is a commoner. A and B said the following. A: “B is of a higher rank than C.” B: “C is of a higher rank than A.” What did C answer to the question: “Who is of a higher rank - A or B?”
Answer: B.

Solution. Let's go through the options for who A can be.

If A is a knight, then B is an ordinary person, and C is a liar, and C will answer: "B". If A is a liar, then C is a knight, and B is an ordinary person, and C will also answer: "B". Finally, if A is an ordinary person, then B cannot be a knight (otherwise C would also be a knight, which is impossible), nor can he be an ordinary person, so he must be a liar, but then C would also be a liar, which is impossible. Therefore, A cannot be an ordinary person.

Thus, C will always answer: "B".