Order of Finite p-Group is Power of p

Theorem
Let $G$ be a group.

Let $p$ be a prime number.

Let all elements of $G$ have order a power of $p$.

Then $G$ is a $p$-group.