Rosetta Problems

Tree Tree Tree

https://atcoder.jp/contests/arc167/tasks/arc167_f