Evlampiy gift rooted tree the vertex tree number 1 n each vertex integer a_i write for vertex Evlampiy calculate c_i number vertice j subtree vertex a_j a_i illustration second example integer a_i integer parenthese c_iafter new year Evlampiy remember gift he remember tree value c_i completely forgot integer a_i write verticeshelp restore initial integer