
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 traversed an \$n\$×\$n\$ chessboard, visiting each square exactly once, with each move being exactly one square. The squares are numbered from 1 to \$n^2\$ in the order of the rook's traversal. Let \$ M \$ be the maximum difference between the numbers of adjacent (by side) squares. What is the smallest possible value of \$ \mathrm{M} \$?

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