One cord, n nails. Each wrap writes a letter in a free group; pulling a nail deletes its letters; the picture falls when the word cancels to nothing.
This picture hangs on two nails — but not the way anyone hangs a picture. Follow the cord: around nail 1, around nail 2, back around 1 the opposite way, back around 2 the opposite way. As letters: x₁x₂x₁⁻¹x₂⁻¹.
This puzzle also lives as its own page with more room to breathe: /picture-hanging.
Every pass of the cord over a nail is a letter: over nail 1 left-to-right writes x₁, right-to-left writes x₁⁻¹. A wrap followed immediately by its unwrap is no wrap at all — the two letters cancel. The picture hangs exactly when the whole word doesn't cancel away.
Pulling a nail deletes every letter of that nail — and that's when dominoes fall. In the classic two-nail trick x₁x₂x₁⁻¹x₂⁻¹, deleting either nail's letters lets the rest annihilate in pairs.