Rubanov I.S.

On a plane, all vertices of a regular $n$-gon and its center were marked. Then the contour of this $n$-gon was drawn, and the center was connected to all vertices; as a result, the $n$-gon was divided into $n$ triangles. Vasya wrote a number in each marked point (some of the numbers may be equal). In each triangle of the partition, he wrote in an arbitrary order the three numbers standing at its vertices; after that, he erased the numbers in the marked points. For which $n$ can Petya always restore the number in each marked point from the triples of numbers written in the triangles?
Let $A_{1} A_{2} \ldots A_{n}$ be the given polygon, and $S$ be its center.

We will show that if $n$ is even, there exist two different arrangements in which the corresponding triples will be the same. Then Petya will not be able to restore the original numbers. Place the number 1 in $S$, and in the vertices of the $n$-gon, place ones and twos alternately. When the numbers are shifted one step clockwise, the triples $\{1,1,2\}$ will not change.

For odd $n$, Petya will be able to restore all the numbers. Note that the number from vertex $A_{i}$ is written in two triples, while the number from $S$ is written in $n$ triples. Therefore, only the number from $S$ will appear in all triples an odd number of times, and Petya will be able to determine it. After that, for each pair of adjacent vertices of the $n$-gon, he knows which two numbers are written in them. It remains to restore the numbers at the vertices from this data. By listing the numbers from all pairs of adjacent vertices, we will get a "doubled" set of all the numbers at the vertices. Comparing it with the set of numbers in pairs $\left(A_{1}, A_{2}\right),\left(A_{3}, A_{4}\right), \ldots$,

$\left(A_{n-2}, A_{n-1}\right)$, we will find the number at vertex $A_{n}$. Similarly, the numbers at the other vertices are found.

## Answer

For odd $n$.