permutation in lexicographic order