
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
The cells of an $n \times n$ square are painted in $n$ colors, with $n$ cells in each color. For which $n$ is it possible to paint the square such that each row and each column contains cells of exactly two colors?

Present the answer in LaTex format: \boxed{Your answer}
user