Proving that $\operatorname{Hom}(\mathbb{Z}/m\mathbb{Z},\mathbb{Z}/n\mathbb{Z}) \cong \mathbb{Z}/\gcd(m,n)\mathbb{Z}$ using short exact sequences.
A short exact sequence $0 \to A \to B \to C \to 0$ of modules can be lifted to a short exact sequence of abelian groups$0 \to \operatorname{Hom}(C, P) \to \operatorname{Hom}(B, P) \to \operatorname{Hom}(A,P)$. But how does this apply to our situation here? I do not see where $\gcd(m,n)$ fits into this frame.