Find all functions from $f :\mathbb{R} \rightarrow \mathbb{R}$ such that it satisfies $|f(x)| = |x|$ , $f(f(-y))= -f(y)$ and $f(f(x))= f(x)$ $\forall$ $x,y \in \mathbb{R}$ .
What I did was: say $f(x) = x \forall x \in \mathbb R$ then it satisfies all conditions given ,so its a possible solution. If we have $f(x) = -x$ for some part in the domain of $f(x)$, we will get that by the second and third condition that $f(-x) = f(x)$ and $f(f(x))= -f(x)$ but now I am not getting how to show whether this is possible or not.