Problem 3. On a board, the numbers $1, 2, 3, \ldots, 27$ are written. One step means erasing three numbers $a, b, c$ from the board and writing in their place the number $a+b+c+n$, where $n$ is a fixed non-zero natural number. Determine the natural number $n$ knowing that, after 13 steps, the number $n^2$ is written on the board.