## Finitely Generated Abelian Groups

I'll be glad to receive some help in the following question:

Let $p$ be prime and let $b_1 ,...,b_k$ be non-negative integers. Show that if :
$G \simeq (\mathbb{Z} / p )^{b_1} \oplus ... \oplus (\mathbb{Z} / p^k ) ^ {b_k}$
then the integers $b_i$ are uniquely determined by G . (Hint: consider the kernel of the homomorphism $f_i :G \to G$ that is multiplication by $p^i$ . Show that $f_1 , f_2$ determine $b_1$. Proceed similarly )

I've tried considering the mentioned homomorphisms, but without any success... I'll be delighted to receive some guidance/solution to this problem (that is some kind of a preliminary step towards the proof of the classification theorem of abelian groups).

Thanks in advance !