
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
Person A has $m$ beans and person B has $m+2n$ beans $(m, n \geqslant 1)$. They play a game by flipping a coin: if heads, B gives A one bean; if tails, A gives B one bean. The game ends when one person runs out of beans. Let $A$ denote the set of all sequences of coin flips that result in person A losing all $m$ beans exactly after $m+2n$ flips. Determine the number of sequences in set $A$.

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