The following is exercise 7 of chapter one from Hungerford’s algebra book.
Let $H,K,N$ be nontrivial normal subgroups of a group $G$ and suppose that $G=H\times K$. Prove that $N$ is in the center of $G$ or $N$ intersects one of $H$ or $K$ nontrivially. Give examples to show that both possibilities can actually occur when $G$ is $\color{blue} {nonabelian}$.
I think that the abelian group $G=\mathbf Z_2 \times Z_2 \times Z_2$, and its normal subgroups $H=0\times \mathbf Z_2 \times \mathbf Z_2$, $K=\mathbf Z_2 \times 0 \times 0$ and $N= \mathbf Z_2 \times \mathbf Z_2 \mathbf \times 0$ satisfy the hypotheses of the claim and $N$ is contained in the center of $G$ and it also nontrivially intersects $H$ and $K$. Do I miss a point?