
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 the function $f(x)=\left\{\begin{array}{l}x+4, x\leq 0\\x^2-2x, 0<x\leq 4\\-x+2, x>4\end{array}\right.$.<br/>$(1)$ Find the values of $f(0)$, $f(5)$, and $f(f(f(5)))$;<br/>$(2)$ If $f(a)=8$, find the value of $a$.

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