A new student joined the class, and it was known that besides English, he also spoke another foreign language very well. Three classmates were guessing which language it was.

The first one thought: "It's not French."

The second guessed: "It's Spanish or German."

The third reasoned: "It's Spanish."

Soon they found out that at least one of them was right and at least one was wrong.

Determine which of the mentioned languages the new student mastered.

(M. Volfová)

Hint. Consider each language separately.
If the language that the new student mastered was French, then all three classmates would guess incorrectly.

If the language were Spanish, then all three classmates would guess correctly.

If the language were German, then the first two classmates would guess correctly and the third one incorrectly. This is the only case where at least one classmate guesses correctly and at least one incorrectly. Therefore, the new student masters German.

#