
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
(6 points) (2015•Lishui Mock Test) Suppose the sequence $\{a_n\}$ is an arithmetic sequence with a common difference of $d$, and $a_1+a_3+a_5=105$, $a_2+a_4+a_6=99$. Find the value of $d$, the general term $a_n$, and the value of $n$ for which the sum of the first $n$ terms $S_n$ is maximized.

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