Let $G$ be a finite group. Let $\mathfrak{P}$ denote the set of prime numbers and $n$ the order of $G$. Since $n>0$, there exists a unique family $(\nu_q(n))_{q\in\mathfrak{P}}$ of elements of $\mathbb{N}$ such that $$n=\prod_{q\in\mathfrak{P}}q^{\nu_q(n)},$$ where the set $\mathfrak{Q}:=\{q\in\mathfrak{P}\ |\ \nu_q(n)\ne0\}$ is finite.
It is clear that, for all $q\in\mathfrak{Q}$, we have $n\in q\mathbb{Z}$. For each $q\in\mathfrak{Q}$, let $P_q$ denote a Sylow $q$-subgroup of $G$. Finally, let $$H:=\bigcup_{n\in\mathbb{N}}\left\{y\ |\ (\exists)(x\in\left(\bigcup_{q\in\mathfrak{Q}} P_q\right)^{[1,n]}\land y=\prod_{i=1}^nx_i) \right\}.$$
Obviously $H\leq G$.
I want to show that $G=H$. My idea is to show that $\text{ord}(G)=\text{ord}(H)$. But I am not sure how to calculate the cardinality of $H$ since it is a generated subgroup.