[Dummit, p 174 Q9]

Prove that if p is an odd prime and P is a group of order p^{3} then the p th power map x \mapsto x^{p} is a homomorphism of P into Z(P). If P is not cyclic, show that the kernel of p th power map has order p^{2} or p^{3}. Is the squaring map a homomorphism in non abelian group of order 8? Where is the oddness of p needed in the above proof?