In 1996, an article appeared in The Harvard Review of Philosophy, written by philosopher and logician George Boolos.
The riddle it contained was later dubbed 'The Hardest Logic Puzzle Ever' in the Italian newspaper La Repubblica.
It goes as follows:
Three gods A, R, and C are called, in some order, True, False, and Random. True always speaks truly, False always speaks falsely, but whether Random speaks truly or falsely is a completely random matter.
Your task is to determine the identities of A, R, and C by asking three yes-no questions; each question must be put to exactly one god. The gods understand English, but will answer all questions in their own language, in which the words for 'yes' and 'no' are 'da' and 'ja,' in some order.
You do not know which word means which.
You can ask a single god more than one question, and questions can depend on the answers to previous questions.
Also Random's responses should be considered exactly that - as if a coin has flipped in the brain.
As Boolos explained in the article, the solution lies in identifying a god who you can be certain is not Random, by asking a question which true or false cannot commit an answer to.
Your first question should be asked to 'A':
Does 'da' mean yes if and only if you are True, if and only if B is Random?
From there, it really gets quite complicated, and you should see Boolos' explanation in the original article here.