Rosetta Problems

Snuke the Phantom Thief

https://atcoder.jp/contests/agc031/tasks/agc031_e