
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
In how many ways can an $n \times n$ grid be filled with positive integers ranging from 1 to $n^{2}$ such that the difference between numbers in adjacent cells is not greater than $(n+1)$? (Two cells are adjacent if they share a common edge or vertex.)

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