fixed permutation printing