Question 2
Find all positive integers $n$ for which each cell of $n \times n$ table can be filled with one of the letters $I$, $M$ and $O$ in such a way that:
• In each row and column, one third of the entries are $I$, one third are $M$ and one third are $O$; and
• in any diagonal, if the number of entries on the diagonal is a multiple of three, then one third of the entries are $I$, one third are $M$ and one third are $O$.
Note: Rows and columns are labelled $1,\ldots,n$ in natural order. Each cell corresponds to $(i,j)$ with $1\le i,j\le n$. For $n\gt1$, there are $4n-2$ diagonals of two types: cells with $i+j$ constant, and cells with $i-j$ constant.
• In each row and column, one third of the entries are $I$, one third are $M$ and one third are $O$; and
• in any diagonal, if the number of entries on the diagonal is a multiple of three, then one third of the entries are $I$, one third are $M$ and one third are $O$.
Note: Rows and columns are labelled $1,\ldots,n$ in natural order. Each cell corresponds to $(i,j)$ with $1\le i,j\le n$. For $n\gt1$, there are $4n-2$ diagonals of two types: cells with $i+j$ constant, and cells with $i-j$ constant.