$G$ is group , $|G|=n$ , suppose every $d$ divides $n$ , there are $d$ elements so $x^d=1$ , prove $G$ is cyclic.
we have prime factorization of $n=$$p_1^x....p_k^z$.
define $$H=p_j^i$$ because its a p-group there is T subgroup of H , order |$(p_j)^(i-1))$| .
take $g ∈ H , g∉T , o(g)=$$p_j^i$ because if o(g)=$p_j^(i-1)$ there are too much elements exist $(g)^(p_j)^(i-1) = 1$
i dont know how to generalize it for every G and not just for p-group.