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

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