
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
Using $m$ colors ($m \geq 2$) to paint a $1 \times n$ chessboard ($n \geq 2$), where each square is painted in one color, adjacent squares have different colors, and the first and last squares must also be different colors. Find the number of different ways to paint the chessboard.

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