Knight = always says the truth
knave = always lying
Assume there are only knight and knaves. Suppose A says: " B and C are of the same type". Then you ask C " Are A and B of the same type?" What does C answer?
Suppose A is a knight, then what he says is true. Therefore, B and C are both knaves. When you ask C, a knave, if A and B are of the same time, ...
A logic problem is solved.