Find all positive integer $k$s for which such $f$ exists and unique:

$f(mn)=f(n)f(m)$ for $n, m \in \mathbb{Z^+}$
$f^{n^k}(n)=n$ for all $n \in \mathbb{Z^+}$ for which $f^x (n)$ means the n times operation of function $f$(i.e. $f(f(...f(n))...)$)