
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 \geqslant 2$) to color a $1 \times n$ board ($n \geqslant m$) where each cell is colored with one color, find the number of ways to color the board such that adjacent cells have different colors, the first and last cells also have different colors, and each color is used at least once.

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