Non-abelian group $G$ of order $p^3$ I just need some hints to prove this:

Let $|G|=p^3$ be a a non-abelian group. If every subgroup of $G$ is normal, then  $p=2$ and $G=Q_8$.

I know the following facts about a non-abelian group $G$ of order $p^3$:


*

*$Z(G)=G'=Z_p$


*If $p$ is an odd number, then the function $\phi:G\longrightarrow Z(G)$ given by $ \phi(g)=g^p$ is a homomorphism and $|\ker(\phi)|=p^2$ or $|\ker(\phi)|=p^3$.

 A: Suppose $p$ is odd. Consider the kernel of $\phi$ in the second fact. It consists exactly of the elements of order dividing $p$, and so there are either $p^2$ or $p^3$ of these; always more than $p$.  However, by the first fact, there are exactly $p$ central elements of order dividing $p$.  In particular, for every odd prime $p$ and non-abelian $p$-group $G$, there is a non-central element of order $p$, and the subgroup it generates is not normal (since it is order $p$ and not central by assumption).
Suppose $p=2$. Then there are two very explicit cases, $D_8$ which doesn't work, and $Q_8$ which does.
Groups like this, in which every element of order $p$ are central, have been studied by JG Thompson and others.  Maps like $\phi$ always exist, and serve to build the upper exponent-$p$ series of the group. In particular, if $Z(G)$ is cyclic, $p$ is odd, and every element of order $p$ is central, then $G$ itself is cyclic. If $Z(G)$ has rank 2, then the “socle series” of $G$ has factors of rank at most 2.
A: In light of Jack's neat comments:

Corollary (1): Let $G$ be a finite $p$-group and let $N$ be a normal subgroup of $G$. Then if $|N|=p$ then $N\leq Z(G)$. 

This is a consequence of a well-known theorem noting if $G$, a finite $p$-group, has a non-trivial normal subgroup $N$ then $N\cap Z(G)\neq1$.

Corollary (2): Let $G$ be a non-abelian group of order $p^3$, where $p$ is an odd prime. Then $G$ has normal subgroups $N$ such that $$Z(G)<N<G$$ and $N\cong\mathbb Z_p\times\mathbb Z_p$.

According to the second corollary, a non-abelian group $G$, of order $p^3$, where $p$ is odd prime, has normal subgroups which are not central. This corollary excludes $Q_8$. Suppose that $1\neq x\in G$ is an element of order $p$ and $N=<x>$.  Since we accept that for our group every subgroups are normal in $G$ so we would have a contradiction if $p$ be odd prime.
