Problem 2. In Lesogoria, only elves and gnomes live. Gnomes lie when talking about their gold, but tell the truth in all other cases. Elves lie when talking about gnomes, but tell the truth in all other cases. One day, two Lesogorians said:

$A$ : All my gold I stole from the Dragon.

B: You are lying.

Determine whether each of them is an elf or a gnome.

$[4$ points] (I. V. Raskina)
Answer: Both are gnomes.

Solution. Suppose $A$ is an elf. Then he told the truth, and $B$ lied. But neither gnomes nor elves lie when talking about elves. Therefore, $A$ is a gnome. Speaking about the gold, he lied. Therefore, $B$ told the truth about $A$. This could only be done by a gnome.