I'd like to have the following proof verified. Feedback welcome.
Suppose that $G$ is a finitely generated abelian group and $G=\mathbb Z_{r_1} \oplus\cdots \oplus \mathbb Z_{r_s} \oplus F_1$ where $r_1|r_2|\cdots|r_s$ and $F_1$ is a free abelian group. If also $G=\mathbb Z_{w_1} \oplus...\oplus \mathbb Z_{w_t} \oplus F_2$ is another such decomposition, I wish to show that $r_s=w_t, r_{s-1}=w_{t-1},\ldots$ whence $s=t$. We assume that we have already proved that $F_1 \cong F_2$.
To prove my claim, any element of $G/F_1$ of maximal order has order $r_s$ so that any element of maximal order in $G/F_2$ must have order $r_s$ as well, but such as element has already order $w_t$ so that $r_s=w_t$. Using the fact that finite groups are simplifiable as mentioned in the comments below, we deduce that $r_{s-1}= w_{t-1}$, and so on (a few trivial details such as $G/F_1 \cong G/F_2$ have been implicitly used).