Special Permutations

Special Permutations - Coding Problem | K5kC