Problem

Source: All-Russian MO 2023 Final stage 11.5

Tags: number theory



Initially, $10$ ones are written on a blackboard. Grisha and Gleb are playing game, by taking turns; Grisha goes first. On one move Grisha squares some $5$ numbers on the board. On his move, Gleb picks a few (perhaps none) numbers on the board and increases each of them by $1$. If in $10,000$ moves on the board a number divisible by $2023$ appears, Gleb wins, otherwise Grisha wins. Which of the players has a winning strategy?