Let $A$ be a $\mathbb{Z}$-module, let $a$ be an element of $A$ and let $n$ be a positive integer. Prove that the map $\phi_a:\mathbb{Z}/n \mathbb{Z} \rightarrow A$ given by $\phi(\bar{k})=ka$ is a well-defined $\mathbb{Z}$-module homomorphism iff $na=0$. Prove that Hom$_{\mathbb{Z}}(\mathbb{Z}/n \mathbb{Z},A) \cong A_n$, where $A_n=\lbrace a \in A | na=0 \rbrace$.
I manage to prove the iff part. My question is what map should I defined so that I can prove the two modules are isomorphic?
Initially I defined the map $f:$Hom$_{\mathbb{Z}}(\mathbb{Z}/n \mathbb{Z},A)$ $\rightarrow A_n$ where $f(\phi_a)=a$. But this brings me nowhere.
Can anyone give some hints?