
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
Given a square grid of size $2023 \times 2023$, with each cell colored in one of $n$ colors. It is known that for any six cells of the same color located in one row, there are no cells of the same color above the leftmost of these six cells and below the rightmost of these six cells. What is the smallest $n$ for which this configuration is possible?

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