next permutation

480ms
600ms