Problem 8.8. On an island, there live knights who always tell the truth, and liars who always lie.

One day, 10 inhabitants of the island gathered, each wearing a T-shirt with a number from 1 to 10 (different inhabitants had different numbers). Each of them said one of the following phrases:

- "Among those gathered, there is no knight whose T-shirt number is greater than mine"
- "Among those gathered, there is no liar whose T-shirt number is less than mine".

It is known that each of these phrases was said exactly 5 times. How many knights could there be among these 10 inhabitants? List all possible options.
Answer: $1,2,3,4,5,6$.

Solution. Consider the people who said the first phrase. Among them, there is no more than one knight (otherwise, the knight with the smallest number among them would have lied). Thus, the total number of knights is no more than 6.

Also, among all present, there is at least 1 knight (otherwise, all the liars who said the first phrase would have been telling the truth).

For each number of knights from 1 to 6, there is an example. Suppose the people say the phrases in the order of their jersey numbers. Write down in a row the numbers of the phrases they say:

- 2, 2, 2, 2, 2, 1, 1, 1, 1, 1: a total of 6 knights with numbers $1-5$ and 10.
- 2, 2, 2, 2, 1, 2, 1, 1, 1, 1: a total of 5 knights with numbers $1-4$ and 10.
- 2, 2, 2, 1, 2, 2, 1, 1, 1, 1: a total of 4 knights with numbers $1-3$ and 10.
- 2, 2, 1, 2, 2, 2, 1, 1, 1, 1: a total of 3 knights with numbers $1-2$ and 10.
- 2, 1, 2, 2, 2, 2, 1, 1, 1, 1: a total of 2 knights with numbers 1 and 10.
- $1,2,2,2,2,2,1,1,1,1$ : a total of 1 knight with number 10.