Rosetta Problems

Paired Wizards

https://atcoder.jp/contests/arc142/tasks/arc142_f