
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
The sequence $\{a_n\}$ is an arithmetic sequence with the first term $a_1=23$ and the sixth term $a_6=3$. The sum of the first $n$ terms is denoted as $S_n$.

(1) Find the common difference $d$;  
(2) Find the maximum value of $S_n$;  
(3) When $S_n$ is positive, find the maximum value of $n$.

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