Let $G$ be a group. The set of all automorphisms of $G = \operatorname{Aut}(G$), with $(\operatorname{Aut}(G), \circ)$ also being a group.
Consider $C_n=\langle g:g^n=1\rangle$, the cyclic group of order $n$. For each positive integer $m$ with $1\leq m\leq n$ define a map $f_m:C_n\rightarrow C_n$ as follows: for $r\in \mathbb{Z}, f_m(g^r):=g^{rm}$
Show that if $f:C_n\rightarrow C_n$ is a homomorphism of $C_n$ then $f=f_m$ for some $m$.
Hint: show that if $f(g)=g^k$ then $f=f_k$.
I do not quite know what to do. I know when $r=1$, $f_m(g)=g^m$ but can't see if this helps.