Rosetta Problems

Come Back in One Piece(★5)

https://atcoder.jp/contests/typical90/tasks/typical90_u