Rosetta Problems

Permutation problem

https://marisaoj.com/problem/226