Rosetta Problems

Snuke the Wizard

https://atcoder.jp/contests/exawizards2019/tasks/exawizards2019_c