Eezie, a pie maniac, would like to have some pies with her friends on a hot summer day. However, the weather is so hot that she can't go outdoors and has to call for the delivery service.
The city Eezie lives in can be represented by

nodes connected by

edges, and the city center is node

. In other words, the city is a rooted tree, root of which is node

. There are

pie houses in the city, the

-th on node

. For some reason, a pie house on node

can only deliver its pie to nodes on the simple path from node

to node

.
Eezie is a bit worried that a pie might lose its flavor during the deliver. After some careful calculation, she decided that a pie from the

-th pie house can maintain its flavor if the distance it is delivered does not exceed its flavor-loss-distance

.
The distance between two nodes on the tree is the number of edges on the simple path between them. Now, Eezie wants to order some pies for all her friends who live on different nodes of the tree. Therefore, she wants you to calculate for each node how many pie houses can deliver their pie to the node without flavor loss.
The first line contains an integer
)
, representing the number of nodes of the city Eezie lives in.
Each of the next

lines contains two integers
)
, representing an edge. It is guaranteed that the edges form a tree.
The last line contains

integers
)
, representing the maximum travel distances for pies from pie houses.