I'm solving the following problem.
Let H be a group and $\tau_1:H\rightarrow G_1, \tau_2:H\rightarrow G_2,\cdots\tau_n:H\rightarrow G_n$ homomorphims with this property: Whenever $G$ is a group and $g_1:G\rightarrow G_1, g_2:G\rightarrow G_2,\cdots g_n:G\rightarrow G_n$ are homomorphisms, then there exists a unique homomorphism ${g}^*:G\rightarrow H$ such that $\tau_i\circ {g}^*=g_i$ for every $i.$ Prove that $H\cong G_1\times G_2\times \cdots \times G_n.$
Actually I solved several exercises regarding projection homomorphism before this, so I first chose $G = G_1\times G_2\times \cdots \times G_n, g_i=\pi_i$ for all $i$ (usual projection mapping from $G_1\times G_2\times \cdots \times G_n$ to $G_i$). Then, I tried to show that a function $f:H\rightarrow G_1\times G_2\times \cdots \times G_n$ defined as $f(h) = (\tau_1(h),\tau_2(h),\cdots,\tau_n(h))$ is an isomorphism.
1. $f$ is a homomorphism.
Since $\tau_1,\tau_2,\cdots,\tau_n$ are homomorphisms,
$f(ab)=(\tau_1(ab),\tau_2(ab),\cdots,\tau_n(ab))=(\tau_1(a)\tau_1(b),\tau_2(a)\tau_2(b),\cdots,\tau_n(a)\tau_n(b))=(\tau_1(a),\tau_2(a),\cdots,\tau_n(a))(\tau_1(b),\tau_2(b),\cdots,\tau_n(b))=f(a)f(b).$
2. $f$ is surjective.
For $(y_1,y_2,\cdots,y_n) \in G_1\times G_2\times \cdots \times G_n,$
$f({g}^*((y_1,y_2,\cdots,y_n))) = (\tau_1({g}^*((y_1,y_2,\cdots,y_n))),\tau_2({g}^*((y_1,y_2,\cdots,y_n))),\cdots,\tau_n({g}^*((y_1,y_2,\cdots,y_n)))) = (\pi_1((y_1,y_2,\cdots,y_n)),\pi_2((y_1,y_2,\cdots,y_n)),\cdots,\pi_n((y_1,y_2,\cdots,y_n))) = (y_1,y_2,\cdots,y_n).$
3. $f$ is injective.
This was the most challenging part for me. Suppose that $f$ is not injective so that there exists $x,y \in H$ such that $x\neq y$ and $f(x) = f(y).$ Motivated by Daniel Fischer's comment(Link), I set $G = \ker f$ and $g_i= {\tau_i}^{'}$ for all $i$, where ${\tau_i}^{'} = \tau_i|_G$. Note that each ${\tau_i}^{'}$ is a homomorphism. After that, define $u_1,u_2 : G \rightarrow H$ as $u_1(g) = g$ and $u_2(g) = e_H.$ Clearly, these two functions are homomorphisms. Then, $(\tau_i\circ u_1)(g) = \tau_i(g) = e_{G_i} = \tau_i(e_H) = \tau_i(u_2(g)) = (\tau_i\circ u_2)(g).$ It follows that $\tau_i\circ u_1 = \tau_i\circ u_2 = {\tau_i}^{'}$ for every $i.$
Since $f(x) = f(y), f(xy^{-1}) = f(x)f(y^{-1}) = f(x)f(y)^{-1} = (e_{G_1},e_{G_2}, \cdots,e_{G_n}).$ Thus, $xy^{-1} \in \ker f = G.$ Also, as $x \neq y, $ $xy^{-1} \neq e_H.$ Then, $u_1(xy^{-1}) = xy^{-1} \neq e_H = u_2(xy^{-1}).$ Thus, $u_1 \neq u_2$, which is a contradiction to the uniqueness hypothesis!
By 1,2,3, $f$ is an isomorphism. Thus, $H\cong G_1\times G_2\times \cdots \times G_n.$
Is my argument correct? Especially , part 3 was pretty tricky to me.