
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
The positive integers $M$ and $M^2$ both end in the same sequence of four digits $efgh$ when written in base $10$, where digit $e$ is nonzero. Find the three-digit number $efg$, given that $M$ or $M-1$ is divisible by $32$ and the other by $125$.

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