Find all positive integers nn for which each cell of an n×nn \times n table can be filled with one of the letters II, MM and OO in such a way that:

Note: The rows and columns of an n×nn \times n table are each labelled 1 to nn in a natural order. Thus each cell corresponds to a pair of positive integers (i,j)(i,j) with 1i,jn1 \leq i,j \leq n. For n>1n > 1, the table has 4n24n - 2 diagonals of two types. A diagonal of the first type consists of all cells (i,j)(i,j) for which i+ji + j is a constant, and a diagonal of the second type consists of all cells (i,j)(i,j) for which iji - j is a constant.