A family of nn gnomes likes to line up for a group picture. Each gnome can be uniquely identified by a number 1..n1..n written on their hat. Suppose there are 55 gnomes. The gnomes could line up like so: 1, 3, 4, 2, 51,3,4,2,5. Now, an evil magician…