Among 4 nails, 2 are blue and 2 are red. Hang a painting on these nails so that the painting falls when all the nails of one color are removed, and not before.
We can consider the nails of the same color as a single "large nail," and apply the solution from exercise 1 to the two "large nails." If $a_{1}$ and $a_{2}$ are blue and $a_{3}, a_{4}$ are red, this gives the solution $a_{1} a_{2} a_{3} a_{4} a_{2}^{-1} a_{1}^{-1} a_{4}^{-1} a_{3}^{-1}$