You are given a tree with N nodes rooted at node 1. Each node has a weight on it, and weight of a path is defined as the sum of weights of all nodes lying on that path. Now you will be asked q queries. In each query you are given a number W. You have to print the number of node such that weight of the path from root to that node is equal to W. In case there are more than one such nodes then print the node with the smallest index, and if there is no such node then print -1.
Input
First line contains N as input.
Next N-1 lines contain two space separated integers, description of the edges in the tree.
Next line contains q as input which is total number of queries.
Next q lines contain an integer W.
Output
For each query print the minimum numbered node such that the weight of path from root to that node is equal to W
Constraints
1 <= N <= 10^5
1 <= Q <= 10^5
1 <= W <= 10^18
0 <= W[i] <= 10^13
Note that weight of the largest path in the tree will always be <=10^18
Path from node 1 to node 2 is of weight 2. So least numberd valid node is 2 . Since there is no path of length 9 from root so -1 for second test case