Smart All Permutation