10. There is a sequence of numbers +1 and -1 of length $n$. It is known that the sum of every 10 neighbouring numbers in the sequence is 0 and that the sum of every 12 neighbouring numbers in the sequence is not zero.
What is the maximal value of $n$ ?
10 Firstly, let us show that $n=15$ is possible. Indeed, we can have the sequence
$$
+1+1+1+1+1 \text { - } 1 \text { - } 1 \text { - } 1 \text { - } 1 \text { - } 1+1+1+1+1+1:
$$

Let us prove that $n$ cannot be larger.
Suppose $n \geq 16$ and our sequence is $x=x_{1} x_{2} x_{3} \ldots x_{n}$.
Without loss of generality suppose $x_{1}=1$.
Then, as the sum of every 10 neighbouring numbers is 0 , we have $x_{11}=1$.
Thus we have $x=1 x_{2} x_{3} \ldots x_{10} 1 x_{12} x_{13} \ldots x_{n}$.
We claim that $x_{12}=\ldots=x_{n}=1$.
Indeed, among these, -1 cannot follow 1 since then we will have the sum of 12 consecutive terms of the sequence, which ends with these +1 and -1 being 0 . If $n \geq 16$, then we have at least 6 ones at the end of the sequence which it then makes impossible to have the sum of the last 10 terms to be 0 .