Generate permutations in lexographic order.