
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 two distinguishable flagpoles, and there are $20$ flags, of which $12$ are identical blue flags, and $8$ are identical green flags. Let $M$ be the number of distinguishable arrangements using all of the flags in which each flagpole has a different number of flags, no two green flags on either pole are adjacent, and the first flagpole has fewer flags than the second. Find the remainder when $M$ is divided by $500$.

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