Sorting exits so that they always appear in the same position. It is not efficient