Let $G$ be a finite $p$-group, $|G|=p^n$. Let $M_1,\dots,M_r$ be all the maximal subgroups and suppose they are cyclic. Why is $\Phi(G)\le Z(G)$? $\Phi(G)$ is the Frattini subgroup. I have no idea where to start.
Any hint would be appreciated! Thank you all
Suppose $g \in \Phi(G)$ .
Every maximal proper subgroup of a $p$-group is normal and has index $p$, so if $ i\neq j$ we have $$M_i M_j = G$$ because $M_i M_j $ is a subgroup and $M_i \subsetneq M_i M_j $.
Thus if $x \in G $ there exist $g_i \in M_i \ , \ \ g_j \in M_j$ such that $$x = g_i g_j$$
All the maximal subgroups are abelian because they are cyclic, the Frattini subgroup is contained in every maximal subgroup by definition and so $g$ commutes with $g_i$ and $g_j$, thus $$gx = g g_i g_j = g_ig_j g = xg$$
This means that $$g \in Z(G)$$