22. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ that for all real $x$ satisfy the relations

$$
\underbrace{f(f(f \ldots f}_{13}(x) \ldots))=-x, \quad \underbrace{f(f(f \ldots f}_{8}(x) \ldots))=x
$$
$\square$ On the one hand, from the first relation it follows that

$$
\underbrace{f(f(f \ldots f}_{65}(x) \ldots))=(-1)^{5} x=-x
$$

On the other hand, from the second relation it follows that

$$
\underbrace{f(f(f \ldots f}_{65}(x) \ldots))=f(\underbrace{f(f(f \ldots f}_{64}(x) \ldots)))=f(x) .
$$

Thus, $f(x)=-x$.