I stumbled across a riddle, titled by logician/philosopher George Boolos and conceived by Raymond Smullyan (mathematician/philosopher/logician/professional magician/pianist), which is, allegedly, one of the (if not the # 1) hardest logic puzzles to have existed. If you have heard of it, do not spoil the answer. Try to solve it on your own. Please do refrain from using external sources to find the answer.
Here it is:
Three gods A, B, 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, B, 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.Go for it.* It could be that some god gets asked more than one question (and hence that some god is not asked any question at all).
* What the second question is, and to which god it is put, may depend on the answer to the first question. (And of course similarly for the third question.)
* Whether Random speaks truly or not should be thought of as depending on the flip of a coin hidden in his brain: if the coin comes down heads, he speaks truly; if tails, falsely.
* Random will answer 'da' or 'ja' when asked any yes-no question.