The first line contains the number of nodes N (1≤N≤106).
Each of the next N−1 lines contains the labels Ai and Bi of two nodes joined by an edge (1≤Ai,Bi≤N).
The i-th of the next N lines contains the magic Xi of node i (1≤Xi≤109).
The given graph is always a tree.