
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
Marius has eight kangaroos of different heights for a photography exhibition. He wants to line them up in a single row, but the tallest and the shortest kangaroos insist on being placed at either the first or last position in the line. How many ways can Marius arrange these kangaroos?

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