[permutation] write code for Permutations