Solution to Permutation