
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
There are 3 boys and 4 girls. They need to be arranged in a row according to the following rules. Find the total number of different ways.
1) Person A can only be in the middle or at either end.
2) The boys must be together.
3) Boys and girls cannot be adjacent to each other.
4) There must be exactly 3 people between person A and person B.

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