Rosetta Problems

E869120, who Leaps through Time

https://atcoder.jp/contests/s8pc-6/tasks/s8pc_6_a