Rosetta Problems

Rooted Tree Game

https://onlinejudge.u-aizu.ac.jp/problems/1545