
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
On a sheet of paper, a grid of \( n \) horizontal and \( n \) vertical lines is drawn. How many distinct closed \( 2n \)-segment broken lines can be drawn along the grid lines such that each broken line passes through all horizontal and all vertical lines at least once?

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