In Aluffi's Algebra: Chapter $0$ there is a question asking to give a counterexample to the claim
$G \cong G \times H$ implies $H$ is trivial.
I am looking for a hint. Obviously, at least one of $G$ or $H$ needs to be infinite. Doing something with $\mathbb{Z}$ seems to be the natural thing. I tried showing $\mathbb{Z} \cong \mathbb{Z} \times (\mathbb{Z}/2\mathbb{Z})$ by an ``interlacing evens and odds'' argument, but the "odd + odd" case killed my homomorphism...
Am I on the right track?
Thanks.