
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
Six cards numbered from $1$ to $6$ are to be lined up in a row. Find the number of ways to arrange these six cards such that, when any one of the cards is removed, the remaining five cards are in ascending order, and the card numbered $3$ must be either in the first or the last position in the arrangement.

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