On product of three objects of a category Assume $X,Y,Z$ are objects of category $C$. Prove that if $X\times(Y\times Z)$ exists and $X \times Y$ exists then so does $(X \times Y) \times Z$. 
I just don't see the connection between them. I would appreciate if someone provided some hints, Thanks.
 A: Assume $X\times(Y\times Z)$ exist. That means that there is an object labeled that way, and maps $\pi_X,\pi_{Y\times Z}$ from the object to $X$ and $Y\times Z$ (which must therefore also exist), such that for any object $\mathcal{O}$, if you have arrows $f\colon \mathcal{O}\to X$ and $g\colon\mathcal{O}\to Y\times Z$, then there is a unique arrow $(f\times g)\colon \mathcal{O}\to X\times (Y\times Z)$ such that $\pi_X\circ(f\times g) = f$ and $\pi_{Y\times Z}\circ(f\times g) = g$.
Now note that $g$ is equivalent to a pair of maps $(g_Y,g_Z)$ from $\mathcal{O}$ to $Y$ and $Z$, by the universal property of $Y\times Z$. Thus, you have that for every triple of arrows, $(f,g_Y,g_Z)$, with $f\colon\mathcal{O}\to X$, $g_Y\colon\mathcal{O}\to Y$, and $g_Z\colon \mathcal{O}\to Z$, there is a unique map $\mathcal{F}\colon\mathcal{O}\to X\times(Y\times Z)$ with $\pi_X\circ \mathcal{F}=f$, $\pi_Y\circ\pi_{Y\times Z}\circ \mathcal{F} = g_Y$, and $\pi_Z\circ\pi_{Y\times Z}\circ\mathcal{F} = g_Z$. 
Now, you want to show that there is an object $P$, together with maps $p_{X\times Y}\colon P\to X\times Y$ and $p_Z\colon P\to Z$ such that for any object $Q$ and any maps $f\colon Q\to X\times Y$ (which is equivalent to a pair of maps $f_X\colon Q\to X$ and $f_Y\colon Q\to Y$) and $g\colon Q\to Z$, there is a unique mapo $\mathcal{G}\colon Q\to P$ such that $\pi_{X\times Y}\circ\mathcal{G}=f$ and $pi_{Z}\circ\mathcal{G}=g$.
Seems like there is an obvious choice, so it should just be a matter of verifying it... 
Note: You will need to also check that there is such a thing as “$X\times Y$”...
