iterative permutations printing