5.3. In ten boxes lie balls: $1,3,5, \ldots, 19$ balls. Two friends, Peter and Basil, take turns taking one ball from any box. Peter takes the first ball. The one who, after their move, makes the number of balls in any two boxes the same (possibly zero) loses. Who among them can win regardless of the opponent's moves?
Solution. Peter will win if he makes any permissible moves, that is, such moves after which there will not be a pair of boxes with the same number of balls. Let's prove this. Consider the situation (let's call it critical) when the boxes contain different numbers of balls, but any taking of a ball will lead to a situation where in some two boxes the number of balls will be the same. Clearly, in this case, first, one of the boxes is empty (otherwise, a ball can be taken from the box with the smallest number of balls), and second, for each non-empty box $A$ there is a box with exactly one less ball (otherwise, a ball can be taken from $A$). Thus, in the critical situation, the boxes contain 0, 1, ..., 9 balls, a total of 45. Initially, there was an even number of balls (the sum of ten odd numbers), and now there is an odd number. This means an odd number of balls has been taken, and it is now Basil's turn to take a ball. He loses. Also, note that up to this point, each player could, in turn, make a move that would not lead to his defeat (it has been shown above that the critical situation is unique), which means that up to this point, Peter could definitely not lose.

Answer. Peter will win.