Let $G$ be a finite group. If $G$ has only one maximal subgroup (a maximal subgroup is a proper subgroup $M$ that given a subgroup $H$ of $G$, $M \subset H \subset G$ implies that $H = M$ or $H = G$), prove that the order of $G$ is a power of a prime.
I've been stuck in this exercise for a few days now and just can't solve it.
I tried applying Cauchy to $p$ and $q$ primes that divide the order of $G$ and also to analyse maximal subgroups containing the generated subgroups of the elements of order $p$ and $q$ given by Cauchy's theorem, but without any success.
Step 1. A group $G$ cannot be expressed as a union of proper subgroups if and only if $G$ is cyclic.
Step 2. A finite group that has a unique maximal subgroup cannot be expressed as a union of proper subgroups.
Step 3. If $G$ is cyclic of order $n$, and $p$ is a prime dividing $n$, then $G$ has a subgroup of order $n/p$ that is maximal.