Rosetta Problems

Teleporter and Closed off

https://atcoder.jp/contests/abc291/tasks/abc291_f