
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
In the geometric sequence $\{a_n\}$, $a_1=512$ and the common ratio $q=-\frac{1}{2}$. Let $M_n$ represent the product of its first $n$ terms, i.e., $M_n=a_1 \cdot a_2 \cdot a_3 \ldots a_n$. Find the value of $n$ for which $M_n$ is the largest.

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