
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 positive integers \( n \) and \( m \), let \( A = \{1, 2, \cdots, n\} \) and define \( B_{n}^{m} = \left\{\left(a_{1}, a_{2}, \cdots, a_{m}\right) \mid a_{i} \in A, i=1,2, \cdots, m\} \right. \) satisfying:
1. \( \left|a_{i} - a_{i+1}\right| \neq n-1 \), for \( i = 1, 2, \cdots, m-1 \);
2. Among \( a_{1}, a_{2}, \cdots, a_{m} \) (with \( m \geqslant 3 \)), at least three of them are distinct.

Find the number of elements in \( B_{n}^{m} \) and in \( B_{6}^{3} \).

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