A number arrangement machine, when given a particular input, rearranges it following a particular rule. The following is the illustration of the input and the stages of arrangement.
Input : 245, 316, 436, 519, 868, 710, 689
Step I : 710, 316, 436, 519, 868, 245, 689
Step II : 710, 316, 245, 519, 868, 436, 689
Step III : 710, 316, 245, 436, 868, 519, 689
Step IV : 710, 316, 245, 436, 519, 868, 689
Step IV is the last step of input.