Consider the binary operation \begin{equation} \circ : {1,\dots,n} \times {1,\dots,n} \to {1,\dots,n} \end{equation} presented by its Cayley table. You need to check if the operation is associative, that is if \begin{equation} a \circ (b \circ c) = (a \circ b) \circ c \end{equation} holds for all triplets $$$a, b, c \in {1, \dots, n}$$$.