
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

Consider a sequence with $n$ letters A, $n$ letters B, and $n$ letters C. Create a new sequence beneath it (one letter shorter) by the following rule: if the two letters above are different, write the third letter in that position; if they are identical, write that letter. Repeat this process on the new sequence until it reduces to a single letter. The table below illustrates an example for $n=2$:
$$
\begin{array}{l}
\text{B A A A C} \\
\text{C A A B} \\
\text{B A C} \\
\text{C B} \\
\text{A} \\
\end{array}
$$

Determine all positive integers $n$ such that for any initial arrangement, the final sequence after applying the above operations either has all identical letters or has all letters different.

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