Rosetta Problems

Iroha and Haiku (New ABC Edition)

https://atcoder.jp/contests/abc265/tasks/abc265_d