Rosetta Problems

Iroha Loves Strings (ABC Edition)

https://atcoder.jp/contests/abc042/tasks/abc042_b