In an island there are three types -- knights, liars and knaves. Knights always speak the truth, liars always speak falsely and, knaves strictly alternate between a true statement and a false statement - albeit not necessarily in this order.
A visitor to the island was faced with three such inhabitants Al, Ben and Cal and he wanted to find out their types.
The visitor’s questioning went as follows:
Visitor: Al, which sort are you?
Al: I am a knight.
Visitor: Ben, what are you?
Ben: I am a liar.
Visitor: So, Ben, was Al lying?
Ben: No.
Visitor: Cal, what sort are you? What is Al?
Cal: I am a knight. Al is a knave.
Which is which?