Given a tree of n nodes, where each node i (1≤i≤n) has ci coins attached with it. You have to choose a subset of nodes such that no two adjacent nodes (i.e. nodes connected directly by an edge) are chosen and sum of coins attached with nodes in chosen subset is maximum.
The first line contains the number of vertices n (1≤n≤105) in a tree. Each of the next n−1 lines gives two integers u and v (1≤u,v≤n) and describes an edge in a tree. The last line contains n positive integers c1,...cn — the number of coins in tree nodes.
Print the maximum sum of coins in a chosen subset of tree nodes.