Sorting of the randomly selected axes.