The condom collectors of Swingingland all wear special condoms in their buttonholes to identify themselves as members of the collector clan. Some wear green condoms and some wear orange ones. When asked a yes/no question, the wearers of green condoms always tell the truth, while those who wear orange condoms always lie.
Shortly after the recent raid on the Munch (Condom Logic #1), the leader of the condom collectors, who wears a green condom, learns that an irate Muncher has disguised himself as a condom collector in order to get into the condom dealer's shop (Condom Logic #2) without arousing suspicion, and stolen 100 condoms in an act of revenge. The shop's surveillence tape reveals that the thief has forgotten to wear a buttonhole.
The leader sends out two agents to capture the thief. One agent wears a green condom, the other wears an orange one. The agents soon track the thief down and arrest him. However, in the ensuing scuffle, the agents lose their buttonhole condoms, so the identity of the thief is now in doubt. The three suspects are brought before the leader, who makes the following decree:
"I will ask each of you in turn a yes/no question, and I will stop questioning as soon as any one of you is proved to be either agent or thief."
Of the three suspects, we know that one will lie, one will tell the truth, and one - the thief - may lie or tell the truth as he chooses.
The Leader asks the first suspect "Are you the thief?" and the man gives his answer.
The leader then asks the second suspect "Is the first man lying?" and the second suspect gives his answer.
Then the leader asks the third suspect "Are you the thief?"
On hearing the third suspect's answer, the leader convicts one of the men as the thief.
Which one did he convict?