Rosetta Problems

Yet Another Sorting Problem

https://atcoder.jp/contests/arc124/tasks/arc124_d