Rosetta Problems

Tree Walk

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