An automorphism of a group of odd order

Let G be a finite abelian group of odd order. Let ϕ:GG be the function defined by ϕ(g)=g2 for all gG. Prove that ϕ is an automorphism.