
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
Let \( n \) be a positive integer. Each cell of an \( n \times n \) table is colored in one of \( k \) colors where every color is used at least once. Two different colors \( A \) and \( B \) are said to touch each other if there exists a cell colored in \( A \) sharing a side with a cell colored in \( B \). The table is colored in such a way that each color touches at most 2 other colors. What is the maximal value of \( k \) in terms of \( n \)?

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