Second cohomology group for trivial group action of finite cyclic group on finite cyclic group

Statement
Suppose $$m$$ and $$n$$ are positive integers. We want to consider the second cohomology group for trivial group action:

$$\! H^2(G,A)$$

where $$G \cong \mathbb{Z}_m$$ is the finite cyclic group of order $$m$$ and $$A \cong \mathbb{Z}_n$$ is the finite cyclic group of order $$n$$.

Facts

 * All the corresponding group extensions are abelian because cyclic over central implies abelian. Further, the second cohomology group is isomorphic to $$\mathbb{Z}_d$$ where $$d$$ is the greatest common divisor of $$m$$ and $$n$$.
 * The element corresponding to $$k \in \mathbb{Z}_d$$ is defined as follows: $$f(i,j) = 0$$ if $$i + j < m$$ and $$f(i,j) = k$$ if $$i + j \ge m$$.
 * The automorphism group actions are via the natural surjective homomorphisms $$\mathbb{Z}_m^* \to \mathbb{Z}_d^*$$ and $$\mathbb{Z}_n^* \to \mathbb{Z}_d^*$$.
 * Two different elements in the cohomology group generate equivalent extensions (i.e., pseudo-congruent extensions, and hence isomorphic extension groups) if and only if they generate the same cyclic subgroup of the second cohomology group, or equivalently, they are in the same orbit under the action of $$\mathbb{Z}_d^*$$.
 * The number of equivalence classes of extensions in the sense of pseudo-congruence is thus the Euler totient function $$\varphi(d)$$, where $$d$$ is the greatest common divisor of $$m$$ and $$n$$.