I found this puzzle on the Russian QWERTY channel.
Five people sit around a table playing Mafia. Among them are two innocent people, two Mafiosos, and one detective. The Mafia people know each other; the detective knows who each of them is; and the innocent people have no information whatsoever about anyone at the table.
During this particular game, the innocents and the detective always tell the truth, while mafia people always lie. They start by going around the circle making the following statements:
- A: I know who B is.
- B: I know who the detective is.
- C: I know who B is.
- D: I know who E is.
Who is who?