Assume the prime factorization of the order of $G$: $$ |G|=p_1^{a_1}p_2^{a_2}\dots p_r^{a_r} $$ The condition $$ g^{12}=1,\, \forall g\in G\tag{1} $$ in other words means that we must find those groups whose elements satisfy: $$ \text{ord} (g) \big|12, \, \forall g \in G $$ Intuitively, I can see that
Condition $(1)$ holds for every $g\in G$ if and only if each $p_i^{a_i}$ divides $12$
, obtaining the cases: $$ \begin{align*} &\bullet |G|=1 \longrightarrow G=\{0\} \\ &\bullet |G|=2 \longrightarrow G=\mathbb{Z_2} \\ &... \\ &\bullet|G|=24 \longrightarrow G= \mathbb{Z}_2 \times \mathbb{Z}_{12}\bigg|\mathbb{Z}_4 \times \mathbb{Z}_6\bigg|\mathbb{Z}_2 \times \mathbb{Z}_2 \times \mathbb{Z}_2 \times \mathbb{Z}_3 \\ \end{align*} $$ How could I verify the correctness and prove the sentence in bold? Is it a derivation of Cauchy's theorem?