add next permutation problem.