Timofey and a tree

Problem Name:
Timofey and a tree
Site:CodeForces
Links:
Tags:
Problem setters: