I am taking a first course on group theory.
I understand why $\mathbb{Z}_2\times\mathbb{Z}_3 \cong \mathbb{Z}_6$.
How can I use this fact to show that $\mathbb{Z}_2\times\mathbb{Z}_2\times\mathbb{Z}_3 \cong \mathbb{Z}_2\times\mathbb{Z}_6$ ?
More in general, it looks like (but I am not sure if this is true) that given $\mathbb{G}_1\times\mathbb{G}_2\times\mathbb{G}_3$, I am allowed to take the right most "pair" (i.e. $\mathbb{G}_2\times\mathbb{G}_3$) and replace it with a group isomorphic to it. A sort of associativity rule for the external direct product.
The isomorphisms are given by:
$$\begin{align} \varphi: G\times (H\times K)&\to G\times H\times K,\\ (g, (h,k))&\mapsto (g,h,k);\\ \psi:G\times H\times K&\to (G\times H)\times K,\\ (g,h,k)&\mapsto ((g,h),k);\\ \theta:(G\times H)\times K&\to G\times (H\times K),\\ ((g,h),k)&\mapsto (g,(h,k)). \end{align}$$
Note that the composition of isomorphisms is an isomorphism.
Direct products are commutative via $\rho:(g,h)\mapsto (h,g)$.
Given $\pi: M\cong L$, we have
$$P\times M\cong P\times L$$
via $\pi':(p, m)\mapsto (p, \pi(m))$.