I want to prove a homomorphism $\varphi:\mathbb{Z} \rightarrow \mathbb{Z}/p_1 ^{a_1}\mathbb{Z}\times \mathbb{Z}/p_2 ^{a_2}\mathbb{Z}\times\mathbb{Z}/p_3 ^{a_3} \mathbb{Z}$ is surjective, where $p_1,p_2,p_3$ are distinct prime integers, $a_1,a_2,a_3$ are positive integers.
Define $\varphi (x) =(\bar{x}, \bar{x}, \bar{x})$. I know if there is only $p_1,p_2$, we can prove it by Chinese remainder theorem.
Any help would be appreciated.
Hint: The index of $\ker \varphi$ is equal to the size of the codomain.