
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
Lily has seven identical red marbles, and a large supply of identical blue marbles. She arranges the red marbles and some blue ones in a row, ensuring that the number of marbles whose right-hand neighbor is the same color equals the number whose right-hand neighbor is a different color. Let \( n \) be the maximum number of blue marbles for which such an arrangement is possible, and let \( M \) be the number of ways she can arrange the \( n+7 \) marbles to satisfy this requirement. Find \( M \) modulo 1000.

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