In a crime, three suspects X, Y and Z were caught and questioned. Each person said, ‘One of the other two stole it. I did not do it.’ Later on the police found out that Z was lying and there was only one thief. Who was the thief?