$G$ non abelian, order $p^3$ ($p$ prime). Suppose that the center is $p^2$, prove that $\exists\ x$ outside of the center, of order p Let $G$ be a non abelian group of order $p^3$, with $p$ prime.
I'm proving that $Z(G)$ (its center) is of order $p$. I already know how to do it by saying that its order can't be $p^3$, nor 1, and if it's $p^2$ then $G/Z(G)$ is cyclic then G is abelian, Abs!
But I've been reading another way of proving it and the author supposes that $|Z(G)|=p^2$. Then, she says: "$\exists\ x$ outside the center of $G$, of order $p$." Could someone give me a hint? Thanks!
 A: Take an element $a$ outside the center $Z(G)$. This is possible as the group is supposed to be non abelian. The order of $a$ divides $p^3$. If the order of $a$ is $p$ you're done. If it is $p^2$ then $a^p$ is of order $p$.
A: For every $a \in G \setminus Z(G)$, we have $a^p \in Z(G)$, since $(G : Z(G)) = p$ by assumption.
If we already have $a^p = 1$ for the picked $a\in G\setminus Z(G)$, we're done, so let's suppose $a^p \neq 1$. The order of $a$ can then not be $p^3$, for that would mean $G$ is cyclic, hence abelian. Thus the order of $a$ must be $p^2$. If $Z(G)$ is cyclic, say generated by $g$, then $a^p = g^{kp}$, and $a\cdot g^{-k} \in G\setminus Z(G)$ with $(a\cdot g^{-k})^p = a^p\cdot g^{-kp} = 1$, so then we're done.
It remains to consider the case where $Z(G) \cong C_p \times C_p$. Pick $b \in Z(G) \setminus \langle a^p\rangle$. Then $G =\langle a,b\rangle$, and since $b \in Z(G)$ it follows that $G \cong \langle a\rangle \times \langle b\rangle$ is abelian, contradicting the assumption.
A: Hint:
What are the possible orders of an element in a group of order $p^3$, and what would it mean for such an element not to exist?
