Iterative permutation