Let's consider an arbitrary player. In a random test, this player will guess their card with a probability of exactly $1 / n$, where $n$ is the number of players at the table. We need at least one player to guess the answer with a probability of $1$, therefore, in the correct strategy, the answer will be guessed by exactly one player. Thus, the players' strategies must have some parameter that is different for all players and takes exactly $n$ possible values, from which the player can recover their card. The sum of the numbers on all the cards modulo $n$ will serve as such a parameter.

Thus, in the first run, we will choose the player whose number matches the sum of the numbers on all the cards, and in the second run, using this number as the player's number, we will recover the answer.