
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
The key to a cipher, called the "revolving grille," is a stencil made from a square sheet of grid paper of size \( n \times n \) (where \( n \) is even). Some of the cells are cut out. One side of the stencil is marked. By overlaying this stencil on a blank sheet of paper in four possible ways (with the marked side up, right, down, left), its cutouts completely cover the entire area of the square, with each cell being covered exactly once. The letters of a message, having a length of \( n^2 \), are sequentially written into the cutouts of the stencil, first overlaid on the blank sheet of paper with the marked side up. After filling all the stencil cutouts with letters of the message, the stencil is placed in the next position, and so on. After removing the stencil, an encrypted message appears on the sheet of paper.

Find the number of distinct keys for an arbitrary even number \( n \).

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