Rosetta Problems

Doors in the Center

https://atcoder.jp/contests/abc398/tasks/abc398_a