Rosetta Problems

私、木になります (I become a tree)

https://atcoder.jp/contests/tkppc/tasks/tkppc2015_h