Rosetta Problems

Connection and Disconnection

https://atcoder.jp/contests/agc039/tasks/agc039_a