See two my comments above containing solution of the problem. I repeat: A nonabelianAs this post contains a correct result, is it unclear why it is estimated by $p$-group $G$ has the center of index $p^2$ if and4. This can do only if $G=S\text{Z}(G)$unqualified person. Since only my posts estimated negatively, where $S\le G$ is minimal nonabelianI decided to delete all them.