Residents
A,
B and
C, each of whom are either a Liar or a Knight are brought to stand trial for a crime only one of them commited.
Each person accused one of the other two, but the records do not show who exactly. As it turned out, A was the only Knight of the three.
Curiously enough, if each person switched their testimony, and accused the remaining suspect (not themselves, and not who they accused originally), then B would come out to be the only Knight.
Who was the real culprit in the case?
C was the real culprit. It's easier to understand if you view it as 2 trials, in which each resident changed their testimony. In each trial, C accused one of the others (A, then B, or vice versa). Because C was never a Knight, then both A & B were innocent. Ergo, C is guilty.
That also explains why the other two were Knights. In the first trial, A accused C (correctly), while B accused A. In the second trial, A now accused B, while B accused C.