Your swaps form a 1-1 and onto map from the set to itself. The construction of the set has it sorted. So sorting after the swaps will restore the original ordering.
Thank you very much for your reply. It looks really interesting, but will take me some time to study and aborb it.
The Wolfram Notebook assistant proposes we thy the following.