Tricky permutations

dont know why i m not getting output

Send your code here.