Rosetta Problems

Walk Around Neighborhood

https://atcoder.jp/contests/agc062/tasks/agc062_d