Is there a finite $p$-group $G$ such that :


(a) $G= \langle A,x,y \rangle$, with $G/Z(G)$ has exponent $p$, $A$ is a maximal abelian normal subgroup of $G$, and $G/A$ has order $p^2$ (thus it is elementary abelian of rank $2$);


(b) the class of $G$ is equal to $p$;


(c) the subgroup $\langle B,y \rangle$ has class exactly $p$, where $B$ denotes the center of $\langle A,x \rangle$.


Thanks in advance 



A finite $p$-group with certain properties
I think the same example works that I gave to your question <https://math.stackexchange.com/questions/571949>.


Let $H = C\_p \wr C\_p$, and $G = H\_1 \times H\_2$ with $H\_1 \cong H\_2 \cong H$. So $|H|=p^{p+1}$, $|G|=p^{2(p+1)}$.


The maximal abelian normal subgroup $A$ is the direct product of the base groups of $H\_1$ and $H\_2$, and is elementary abelian of order $p^{2p}$.


Now $H$ has class $p$ and hence so does $G$, which is property (b).


The centre of $H$ has order $p$ and $H/Z(H)$ has class $p-1$ and is generated by two elements of order $p$, so $H/Z(H)$ has exponent $p$ and hence the same applies to $G/Z(G)$, which gives property (a).


We take $x \in H\_1$ and $y \in H\_2$ to be elements outside of $A$. So $B=Z(\langle A,x \rangle)$ includes the base group of $H\_2$, and hence $\langle B,y \rangle$ contains $H\_2$ and has class $p$.


