How to sort the permutations in lexicographical order?

How do we sort the permutations in lexicographical order, please help?