
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
Let the sum of the first $n$ terms of the sequence $\{a_n\}$ be $S_n$, and $S_n=n^2-n+1$. The sum of the first $n$ terms of a positive geometric sequence $\{b_n\}$ is $T_n$, and $b_2=a_2$, $b_4=a_5$.  
$(1)$ Find the general formula for $\{a_n\}$ and $\{b_n\}$.  
$(2)$ For the sequence $\{c_n\}$, where $c_1=a_1$ and $c_n=c_{n+1}-T_n$, find the general term $c_n$ of $\{c_n\}$.

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