
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
Given a sequence $\{a_n\}$ satisfying $a_1=81$ and $a_n= \begin{cases} -1+\log_{3}a_{n-1}, & n=2k \\ 3^{a_{n-1}}, & n=2k+1 \end{cases}$ (where $k\in\mathbb{N}^*$), find the maximum value of the sum of the first $n$ terms of the sequence, $S_n$.

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