add the next permutation solution