Masha and a Beautiful Tree

Problem Name:
Masha and a Beautiful Tree
Site:CodeForces
Links:
Tags:
Problem setters: