Rosetta Problems

Perfect Strings

https://atcoder.jp/contests/agc061/tasks/agc061_f