Exact sequence of abelian groups Let $R= \mathbb Z$ or $\mathbb Q$. Let $A$ be an abelian group. Consider the exact sequence $$0 \to A \to R \to R \to 0.$$ Then $A$ must be zero.
It seems correct but can anyone produce a counterexample?
 A: Let's name the arrows,
$$
0 \to A \xrightarrow{f} R \xrightarrow{g} R \to 0.
$$
By exactness, 
$$
\ker g = \operatorname{im} f \simeq A/\ker f \simeq A.
$$
To conclude we ought to see that $g$ must be injective.
The endomorphisms of $\mathbb{Z}$ are determined by the image of $1$. If $|g(1)| \geq 2$ you can check that $1 \not \in \operatorname{im}{g}$. So by surjectivity it must be $g(1) \in \{1,-1\}$ and so $g = id$ or $g = -id$, both injective. (A fancier argument is to say that since $\mathbb{Z}$ is free, the endomorphism ought to be a retraction, hence the sequence splits and in particular $A$ has to be free of rank zero.)
As for $\mathbb{Q}$, let $p/q$ be an arbitrary rational. by surjectivity, necessarily we get that $g(1) \neq 0$. Then,
$$
qg(1/q) = g(1/q) + \dots + g(1/q) = g(1/q + \cdots + 1/q) = g(1)
$$
which says that $g(1/q) = g(1)/q$. Therefore, we obtain 
$$
g(p/q) = g(1/q) + \dots + g(1/q) = pg(1/q) = g(1) \cdot p/q.
$$
This proves that
$$
h(p/q) := g(1)^{-1}p/q
$$
is an inverse of $g$, in particular, the latter is injective.
