Two possibilities of $X$ to make the sequence $0\longrightarrow\mathbb{Z}\longrightarrow X\longrightarrow\mathbb{Z}_{2}\longrightarrow 0$ exact. I am working on an exercise in homological algebra asking to find the possibilities of $X$ such that the sequence $$0\longrightarrow\mathbb{Z}\longrightarrow X\longrightarrow\mathbb{Z}_{2}\longrightarrow 0$$ is a short exact sequence. 
The exercise says there is only two possibilities of $X$ up to isomorphism. 
I can see that one possibility is $X=\mathbb{Z}\oplus\mathbb{Z}_{2}$ in which case the above sequence also splits, but I don't know another choice of $X$. 
If the sequence is exact, we must have $\mathbb{Z}_{2}=X/\mathbb{Z}$, is there any such $X$? I mean, if it is $\mathbb{Z}/X$, then we know that $X=2\mathbb{Z}$, but what should $X$ be if the quotient is "inversed"??
Thank you so much!
 A: I assume $\mathbb{Z}_2=\mathbb{Z}/2\mathbb{Z}$.  There are two possibilities (up to equivalence of short exact sequences) because $\text{Ext}_\mathbb{Z}^1\big(\mathbb{Z}/2\mathbb{Z},\mathbb{Z})\cong\mathbb{Z}/2\mathbb{Z}$.  The trivial extension (associated to the zero element of $\text{Ext}_\mathbb{Z}^1\big(\mathbb{Z}/2\mathbb{Z},\mathbb{Z})$) is given by the splitting short exact sequence
$$0\to\mathbb{Z} \underset{\iota_0}\hookrightarrow \mathbb{Z}\oplus(\mathbb{Z}/2\mathbb{Z})\underset{\pi_0}\twoheadrightarrow \mathbb{Z}/2\mathbb{Z}\to 0\,,$$
where $\iota_0(x):=(x,0)$ and $\pi_0(x,y):=y$ for all $x\in\mathbb{Z}$ and $y\in\mathbb{Z}/2\mathbb{Z}$.  The nontrivial extension (associated to the unit element of $\text{Ext}_\mathbb{Z}^1\big(\mathbb{Z}/2\mathbb{Z},\mathbb{Z})$) is
$$0\to\mathbb{Z}\underset{\iota_1}\hookrightarrow \mathbb{Z}\underset{\pi_1}\twoheadrightarrow \mathbb{Z}/2\mathbb{Z}\to 0\,,$$
where $\iota_1(x):=2x$ and $\pi_1(x):=x+2\mathbb{Z}$ for all $x\in\mathbb{Z}$.
As for your confusion, it is not a good idea to write $X/\mathbb{Z}\cong \mathbb{Z}/2\mathbb{Z}$ in this situation.  If your exact sequence is
$$0\to \mathbb{Z} \underset{\iota}{\hookrightarrow} X\underset{\pi}{\twoheadrightarrow} \mathbb{Z}/2\mathbb{Z}\to 0\,,$$
then $X/{\color{red}\iota}(\mathbb{Z})\cong\mathbb{Z}/2\mathbb{Z}$.  The map $\iota$ plays a role in making the quotient.  Therefore, even when $X=\mathbb{Z}$, it is still possible to have $X/\iota(\mathbb{Z})\cong\mathbb{Z}/2\mathbb{Z}$ despite the fact that $X/\mathbb{Z}\cong 0$. 
