Rosetta Problems

The Strongest Unity

https://atcoder.jp/contests/awc0163/tasks/awc0163_c