How can a line of people sort themselves by height? Or by age? It depends on what operations they are allowed to use. One might consider using “swaps” where two people in the line switch position with each other. One might also consider using “cycles” where someone at the end of the line moves to the beginning of the line.
This leads to an investigation of “permutations”, which is a fancy word for rearrangements of a set of objects. Some sets of permutations allow the people in the line to sort themselves in any order they choose, while other sets of permutations don’t.