Tim: "I am a joker but Tom is a knave"
Tom: "I am not a joker but Tim is a knight"
Jim: "When Tim and I are in the same room, Tim always lies. But when Tom and I are in the same room, he tells the truth"
Knights tell the truth, knaves lie, jokers just mimic anyone who are in the same room with them
There is only 1 knight, 1 knave and 1 joker
Tim and Tom were in the same room while Jim was outside.
Who was the knight?