Solution (source code)

= Solution

With $A_{ij}=2(\alpha_i,\alpha_j)/(\alpha_j,\alpha_j)$ and roots labeled from left to right, the three <Cartan matrix>[Cartan matrices] are
$$
A(A_3)=\begin{pmatrix}2&-1&0\\-1&2&-1\\0&-1&2\end{pmatrix},\quad
A(B_3)=\begin{pmatrix}2&-1&0\\-1&2&-2\\0&-1&2\end{pmatrix},\quad
A(C_3)=\begin{pmatrix}2&-1&0\\-1&2&-1\\0&-2&2\end{pmatrix}.
$$