You're a cosmonaut dedicated to exploring and understanding strange new worlds. The latest world you've arrived on has a species with a very strange mating dance. After careful observation, you determine the rules for this dance are:
- All aliens on the planet are ordered by height and given a number. Number 1 for the shortest, number 2 for the next shortest, etc. There are no ties.
- The aliens get into a line in a randomized order.
- The alien at the front of the line checks its number, finds the alien at that place in line, and trades place with them. Ex: if the front alien has number 5, it trades places with the fifth alien in line (itself being the first). They repeat this step indefinitely.
- If the shortest alien is at the front of the line, the dance ends and the orgy begins. These aliens will not stop dancing until this happens.
You start to wonder: how can this species exist? Surely given enough time, the random arrangement would result in a never-ending dance and, unable to mate, the species would die off. After pondering and observing a while, inspiration strikes. Now satisfied that this is impossible, you leave the planet in search of more interesting puzzles.
How did you know this species can't die off?