A finite abelian group that does not contain a subgroup isomorphic to $\mathbb Z_p\oplus\mathbb Z_p$, for any prime $p$, is cyclic. 
Suppose that $G$ is a finite abelian group that does not contain a subgroup isomorphic to $\mathbb Z_p\oplus\mathbb Z_p$ for any prime $p$. Prove that $G$ is cyclic.

Attempt: If $G$ is a finite abelian group, then let $H$ be any subgroup of $G$
It's given that $H \not\simeq \mathbb{Z}_p \oplus \mathbb{Z}_p$ which can be due to a variety of reasons like : $|H|$ may not be $p^2$ or $H$ may not contain any element of order $p$ etc
Hence, the process of finding an element $g$ such that $|g| = |G|$ seems difficult, hence, probably the best bet would be to first assume that $G$ is not cyclic.
Hence,  $O(g) \neq |G|~ \forall ~ g \in G$ . 
Also, $G \not\simeq Z_{|G|}$ since $G$ is not cyclic.
How do i arrive at a contradiction from here that if $G$ is not cyclic, it must contain a subgroup $H \simeq \mathbb Z_p \oplus \mathbb Z_p $.
Please note that this question occurs in Gallian before normal and factor groups are introduced.
Thank you for help.
 A: Hint: decompose $G$ into the direct sum of its primary components; then examine each primary component and deduce it's cyclic because it has a minimum nonzero subgroup (that is, the intersection of its nonzero subgroups is nonzero).
A: Factor $|G|$ into primes as $\prod_{i=1}^n p_i^{k_i}$ where the $p_i$ are distinct. Proceed by induction on $n$: the base case is done assuming you know prime-order groups are cyclic. Then for the induction step factor out all instances take a generator $g_1$ of a subgroup of order $p_1^{k_1}$ and $g_2$ of a subgroup of order $|G|/p_1^{k_1}$. (By induction such a subgroup is cyclic since if it contained $\mathbb{Z}_p\oplus \mathbb{Z}_p$ so would $G$.) 
I claim $g_1+g_2$ is a generator of $G$. For suppose $g_1+g_2$ has order $m$. Then $mg_1=-mg_2$. Now $mg_1$ is of order $p_1^n$ for some $1\leq n\leq k_1$, so $p_1^n mg_2=0$ and $|G|/p_1^{k_1}$ divides $p_1^nm$. But $|G|/{p_1^{k_1}}$ is relatively prime to $p_1$, so $|G|/{p_1^{k_1}}$ divides $m$, and $mg_2=0$. Thus $mg_1=0$ as well, so also $p_1^{k_1}$ divides $m$ and thus $|G|$ divides $m$ and $g_1+g_2$ is a generator.
