Solution (source code)

= Solution

We prove the <unique-subgroup criterion for a finite abelian group to be cyclic> using the invariant-factor classification from part (a). If $A$ is nontrivial, write
$$
A\cong C_{d_1}\oplus\cdots\oplus C_{d_s},\qquad 2\leq d_1\mid\cdots\mid d_s,
$$
where $C_m$ denotes a <cyclic group> of order $m$. If $s\geq2$, choose a <prime number> $p$ dividing $d_1$; then $p$ also divides $d_2$. In the first cyclic factor, the element represented by $d_1/p$ has <order of a group element> $p$, and the corresponding element in the second factor has order $p$ as well.

The two elements supported in their separate coordinates generate distinct <subgroups> of order $p$: one has zero second coordinate, and the other has zero first coordinate. Both are subgroups of $A$, and $p\mid|A|$. This contradicts the assumed uniqueness for that divisor. Hence $s\leq1$, and
$$
\boxed{A\text{ is cyclic}.}
$$
If $A$ is the trivial group, it is already cyclic, generated by its identity. Thus the argument covers every finite order.