I'm stuck on this proof. I need to prove:

Let $\langle a \rangle $ be a cyclic group of order $n$ and let $m$ and $n$ be relatively prime. Show that $f(x) = x^m$ is an automorphism.

And this is the work progress I have made so far:

We need to show 3 things:

1. $f$ is injective from $\langle a \rangle$ to $\langle a \rangle$
2. $f$ is surjective from $\langle a \rangle$ to $\langle a \rangle$
3. For all $x,y \in \langle a \rangle$, $f(xy) = f(x)f(y)$

Part 3 is trivial, $f(xy) = (xy)^m = x^my^m=f(x)f(y)$

Since $\langle a \rangle$ is finite, 1 and 2 are logically equivalent. My approach is to show that $f$ is surjective. For this, let $p \in \langle a \rangle$ be given, and let $k = \textrm{ord}(p)$. Then $k|n$.

If $\textrm{ord}(p)=k$ and $k|n$ then $p^n = e$.

I'm really not sure where to go next with the proof. If I can show that there is $x$ such that $p = x^m$ I will be done.