Rosetta Problems

Walk and Teleport

https://atcoder.jp/contests/abc052/tasks/arc067_b