
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 has traveled across an \( n \times n \) board, visiting each cell exactly once, where each of its moves was exactly one cell. The cells are numbered from 1 to \( n^2 \) in the order of the rook's path. Let \( M \) be the maximum difference between the numbers of adjacent (by side) cells. What is the smallest possible value of \( M \)?

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