A condition under which a group must be abelian

Let G and H be groups of order 10 and 15, respectively. Prove that if there is a nontrivial homomorphism ϕ:GH, then G is abelian.