Rosetta Problems

ABC String 2(★6)

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