perfect all permutations