Rosetta Problems

ABCAC

https://atcoder.jp/contests/arc055/tasks/arc055_c