Determine all abelian $G$ such that $0 \to \mathbb{Z} \to G \to \mathbb{Z_n} \to 0$ is exact - from Massey's A basic course in algebraic topology I am self studying from Massey's A basic course in algebraic topology and I am trying do this exercise

Let $A$ be an infinite cyclic group and let $B$ be a cyclic group of order $n$ with $n > 1$. How many solutions are there to the following algebraic problem (up to isomorphism):
Determine an abelian group G and homomorphisms $A \to G$ and $G \to B$ such that the sequence $0 \to A \to G \to B \to 0$ is exact.

If I am correct, every $G_m = \langle g_1, g_2 | mg_1 = ng_2, g_1+g_2 = g_2 + g_1\rangle$ is a solution. My questions are:

*

*Are there other solutions?

*Is $G_m \ncong G_{m'}$ for $m \neq m'$?

*If 2 holds, what is the point for the question "how many solutions..."?

 A: Assume $m=n$. 
Then $G_n \to \mathbb {Z\oplus Z/n}$ defined by $g_1\mapsto (1,1), g_2\mapsto (1,0)$ is well defined (indeed $n\cdot (1,0) = (n,0) = n\cdot (1,1)$) , and it's an isomorphism, with inverse $(n,k)\mapsto (n-k)\cdot g_2 + k\cdot g_1$ (check that it is well-defined and provides an inverse)
But $G_0$ is also isomorphic (for obvious reasons) to $\mathbb{Z\oplus Z/n}$. So $G_0\cong G_n$. 
In fact, if you look at it closer; you will see that if $m\equiv m'$ modulo $n$ then $G_m\cong G_{m'}$.
Also, if $m$ is coprime to $n$, then $G_m \cong \mathbb Z$ ! In fact, in all generality $G_m\cong \mathbb{Z\oplus Z}/(n\land m)$
So up to isomorphism you have not so many $G_m$'s !
If you're studying algebraic topology, you'll come across $\mathrm{Ext}$ groups at some point, and will learn that $\mathrm{Ext}(A,B)$ classifies extensions $0\to B\to G\to A\to 0$ up to equivalence of extensions, and that $\mathrm{Ext}(\mathbb Z/n,\mathbb Z)\cong \mathbb Z/n$ so there are $n$ extensions up to equivalence. 
But that doesn't mean the groups $G$ are all non isomorphic ! Look at the example above for instance, all the $G_m$'s, $0\leq m <n$ define non isomorphic extensions (and are therefore the only extensions - I'm saying this in a sloppy way, I should say what the extensions in question are), but some of them are isomorphic as groups. 
So counting extensions is "easy" : you just have to compute $\mathrm{Ext}$. Then if you happen to know enough nonisomorphic extensions , that tells you that you have all of them, and then you can look at the middle groups of the extensions and wonder which ones are isomorphic (abstracting away from the extension)
