Solution (source code)

= Solution

If $f\circ\phi=f$, then $x$ and $\phi(x)$ have the same value, so every level set is preserved.