Rosetta Problems

Where's Snuke?

https://atcoder.jp/contests/cf16-final/tasks/codefestival_2016_final_a