Here is Prob. 19, Sec. 2.3, in the book Topics in Algebra by I.N. Herstein, 2nd edition:
If $S$ is a set closed under an associative operation, prove that no matter how you bracket $a_1a_2 \ldots a_n$, retaining the order of the elements, you get the same element in $S$ (e.g., $\left( a_1 \cdot a_2 \right) \codt \left( a_3 \cdot a_4 \right) = a_1 \cdot \left( a_2 \cdot \left( a_3 \cdot a_4 \right) \right)$; use induction on $n$).
My Attempt:
Of course the assertion holds for $n = 1, 2, 3$. Suppose it holds for every $k = 1, 2, 3, \ldots, n$ for some $n \in \mathbb{N}$ such that $n \geq 3$.
Let $a_1, a_2, a_3, \ldots, a_n, a_{n+1}$ be any elements of set $S$.
How to proceed from here? How to prove rigorously that, no matter how we bracket $a_1a_2a_3\ldots a_n a_{n+1}$, retaining the order of the elements, we obtain the same element of $S$.