Updated Permutation Solution