Pastable version of Lexicographically next permutation