accpeted next permutation