# Representation of groups via isomophism and the Chinese remainder theorem

I am a little confused about representing groups via the Chinese remainder theorem for example when we have the group: $$C_2 \times C_3 \cong C_6$$ What about when we have something such as: $$C_2 \times C_2 \times C_3 \times C_{3^2} \times C_7$$ does this have two isomorphic representations from the Chinese remainder theorem, I believe from it you are meant to group the coprime orders of the cyclic groups do you therefore get two different ways to write this or is there a right one to choose? e.g. $$C_2 \times C_2 \times C_3 \times C_{3^2} \times C_7 \cong C_{126} \times C_{6} \cong C_{42} \times C_{18}$$

There are two main canonical ways of writing finite abelian groups. One is as product of primes powers, which is this case would be your original $C_2 \times C_2 \times C_3 \times C_{3^2} \times C_7$. The other way is take the largest cyclic, then write the next largest to the right, and so on. In this case, that gives $C_6 \times C_{126}$.
$C_{42} \times C_{18}$ is a valid representation, but not canonical. See https://en.wikipedia.org/wiki/Finitely_generated_abelian_group#Classification