int@n,u[n],v[];rd((u--,v--)(n-1)); graph g; g.setEdge(n,n-1,u,v); rep(i,n)wt(sum[j,0,g.es[i]](g.es[g.edge[i][j]]-1));