Find all functions $f: \mathbb{Z}_{>0} \rightarrow \mathbb{Z}_{>0}$ that satisfy

$$
f(f(f(n)))+f(f(n))+f(n)=3 n
$$

for all $n \in \mathbb{Z}_{>0}$.
From $f(m)=f(n)$ it follows that $3 m=3 n$ so $m=n$. Therefore, $f$ is injective. Now we prove by induction on $n$ that $f(n)=n$ for all $n$.
Since $f: \mathbb{Z}_{>0} \rightarrow \mathbb{Z}_{>0}$, we have $f(1) \geq 1, f(f(1)) \geq 1$ and $f(f(f(1))) \geq 1$. If we substitute $n=1$ into the functional equation, we see that

$$
f(f(f(1)))+f(f(1))+f(1)=3,
$$

so equality must hold everywhere: $f(1)=f(f(1))=f(f(f(1)))=1$.
Now let $k \geq 2$ and assume that we have proven for all $n<k$ that $f(n)=n$. Then, by the injectivity of $f$, it follows that for all $m \geq k$ we have $f(m) \geq k$; the lower function values are already assumed. Therefore, in particular, $f(k) \geq k$ and also $f(f(k)) \geq k$ and therefore $f(f(f(k))) \geq k$. If we substitute $n=k$ into the functional equation, we see that

$$
f(f(f(k)))+f(f(k))+f(k)=3 k
$$

We see that equality must also hold everywhere here, so $f(k)=k$. This completes the induction.
The only function that can satisfy this is thus $f(n)=n$ for all $n$. This function also satisfies the condition, since

$$
f(f(f(n)))+f(f(n))+f(n)=n+n+n=3 n
$$