There is only one structure of ring(with identity) on abelian group $(\mathbb{Z},+)$. Prove that a certain ring homomorphism is surjective. This is an exercise from a textbook "Algebra: Chapter 0" by Paolo Aluffi.
First, I state necessary facts from the book used in the exercise:

For every abelian group $G, End_{Ab}(G)$( the set of group homomorphisms from $G$ to $G$) is a ring with operations:
$+: (f+g)(a) = f(a) + g(a)$
$.: (fg)(a) = f(g(a))$
and zero $0_{End_{Ab}(G)} = $ trivial map $0: \ \ im0 = 0$, identity $1_{End_{Ab}(G)} = 1_G \in End_{Ab}(G)$
Proposition. $End_{Ab}(\mathbb{Z}) \cong \mathbb{Z}$ as rings.
Let $R$ be a ring. For $r \in R$, define left-multiplication by $r$ by $\lambda_r$. $\lambda_r$ is an endomorphism of the underlying abelian group $(R,+)$.
Proposition. Let $R$ be a ring. Then the function $\lambda: R \to End_{Ab}(R)$ defined by $\lambda(r) = \lambda_r$ is an injective ring homomorphism.

Now, here goes the exercise: it's on the page $138$ in book, numbered $2.16$.

Prove that there is (up to isomorphism) only one structure of ring(with identity) on the abelian group $(\mathbb{Z},+)$. Let $R$ be a ring whose underlying group is $\mathbb{Z}$. Then there is an injective ring homomorphism $\lambda: R \to End_{Ab}(R)$, and the latter is isomorphic to the ring $\mathbb{Z}$. Prove that $\lambda$ is surjective is this case.

So, assume $R$ is some ring, whose underlying abelian group is $(\mathbb{Z}, +)$. We may denote it as $(\mathbb{Z}, + , o , 1_R = k)$ where $o$ is multiplication in $R$, and $k$ is some integer serving and identity in this ring.
We need to prove that every group homomorphism $\phi:(\mathbb{Z},+) \to (\mathbb{Z},+)$ may be defined by formula $\phi(n) = d \ o \ n$ for some integer $d$.
But every group endomorphism $\phi$ of $(\mathbb{Z},+)$ is uniquely determined by the image of $1$. Since $\forall n \in \mathbb{Z} \ \ \phi(n) = \phi(n1) = n\phi(1)$.
And  $1_{(\mathbb{Z},+)}$ is determined as $\forall z \in \mathbb{Z} \ \ 1_{(\mathbb{Z},+)}(z) = k(=1_{(\mathbb{Z},+,o)}) \ o \ z = z$.
What can be done next to show $\lambda: (\mathbb{Z}, +, o, k) \to End_{Ab}(\mathbb{Z})$ is surjective?
 A: Suppose $(\mathbb{Z},+,\circ,k)$ is a ring structure ($k$ is the identity). Thus $k\circ x=x$, for every $x\in\mathbb{Z}$.
Suppose $k>0$. Then $k=1+1+\dots+1$, so
$$
x=k\circ x=1\circ x+1\circ x+\dots+1\circ x=k(1\circ x)
$$
In particular, $x\in k\mathbb{Z}$, for every $x\in\mathbb{Z}$. Therefore $k=1$.
Then for $m>0$ and any $n$,
$$
m\circ n=(1+1+\dots+1)\circ n=1\circ n+1\circ n+\dots+1\circ n=
n+n+\dots+n=mn
$$
If $m<0$, $m\circ n=-((-m)\circ n)=-(-mn)=mn$.
Finish it up, by proving that $k\le0$ is impossible.
A: $\lambda(k) = \lambda(k \circ k) = \lambda(k)\circ \lambda(k)$ (here the sign on the left is the multiplication in $R$, and the one on the right is functional composition), since we have a ring-homomorphism.
Hence the image of $k$ in $\text{End}_{\text{Ab}}(\Bbb Z)$ is an idempotent endomorphism. Since every endomorphism in $\text{End}_{\text{Ab}}(\Bbb Z)$ is of the form $j \mapsto nj$ for some integer $n$, the fact that the image of $k$ is idempotent means that:
$n^2 = n$, for $\lambda(k) = n\cdot (-)$.
Now $n^2 = n$ is equivalent to: $n(n - 1) = 0$, and since the integers are an integral domain, we have only two choices: $n = 0$, or $n = 1$.
The former case leads to $\lambda$ being the $0$-map, which is certainly not injective. So we must have $n = 1$, which establishes the surjectivity of $\lambda$.
A: Let $\phi(k)=a$. Then $\phi(k)=a\circ k$. Hence if $\phi(x)=d\circ x$, then $d=a$. This restricts our search.
1. Let's prove that $k=1$ or $k=-1$.
1.1. $k$ can not be $0$: $1\circ 0=0\neq1$.
1.2. If $k>0$, then $1=1\circ k=1\circ(1+...+1)=1\circ1+...+1\circ1$ ($k$ times).
Thus $k$ must be $1$.
1.3. If $k<0$, then $1=1\circ k=1\circ(-1-...-1)=1\circ(-1)+...+1\circ(-1)$ ($-k$ times).
Thus $k$ must be $-1$.
2. Let us now prove that $\phi(x)=a\circ x$.
2.1. $\phi(0)=0=a\circ0$.
2.2.1. $x>0$ and $k=1$.
$\phi(x)=\phi(1+...+1)=\phi(k+...+k)=\phi(k)+...+\phi(k)=a+...+a$.
$\phi(x)=a\circ1+...+a\circ1=a\circ(1+...+1)=a\circ x$. 
2.2.2. $x>0$ and $k=-1$.
$\phi(x)=\phi(1+...+1)=\phi(-k-...-k)=-\phi(k)-...-\phi(k)=-a-...-a$.
But $-a=a\circ(-k)=a\circ1$ (Aluffi, page 120) and we have the same:
$\phi(x)=a\circ1+...+a\circ1=a\circ(1+...+1)=a\circ x$. 
2.3.1. $x<0$ and $k=1$.
$\phi(x)=\phi(-1-...-1)=\phi(-k-...-k)=-\phi(k)-...-\phi(k)=-a-...-a$.
$\phi(x)=a\circ(-1)+...+a\circ(-1)=a\circ(-1-...-1)=a\circ x$.
2.3.2. $x<0$ and $k=-1$.
$\phi(x)=\phi(-1-...-1)=\phi(k+...+k)=\phi(k)+...+\phi(k)=a+...+a$.
$\phi(x)=a\circ(-1)+...+a\circ(-1)=a\circ(-1-...-1)=a\circ x$.
$3.$ Thus the embedding $(\Bbb Z,+,\circ,k)\rightarrow\text{End}_{\text{Ab}}(\Bbb Z,+)$ s.t. $r\mapsto(x\mapsto r\circ x)$ is surjective. 
This gives $(\Bbb Z,+,\circ,k)\cong$ $\Bbb Z$.
