(next | prev) permutation