
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

A rook moves across an $n \times n$ board, visiting each cell exactly once, with each move being exactly to an adjacent cell (one cell away). The cells are numbered from 1 to $n^2$ in the order the rook visits them. Let $M$ be the maximum difference between the numbers of neighboring (side-adjacent) cells. What is the smallest possible value of $M$?

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