Riya's bar magnet has N marked at its left end and S at its right end. It falls on the floor and breaks into three pieces. She lays the pieces in a row, without turning any of them round, and wants to write N or S in each of the six boxes.

Which labelling of the six ends, from left to right, is correct?
