Rosetta Problems

Permutation

https://marisaoj.com/problem/325