Permutations in lexicographic order