
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
A class needs to select 4 students from 8 to participate in the 4×100 meters relay race at the school sports meeting. Among them, students A and B must be selected, and they must run either the first or the last leg. The total number of different arrangements is     (answer in numbers).

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