Rosetta Problems

Teleporting Takahashi 2

https://atcoder.jp/contests/abc372/tasks/abc372_f