The first line contains an integer n.
The next n-1 lines,each line contains two integers - the endpoints of an edge of A.
The next line, an integer t - the number of queries.
For each query:
The first line contains an integer m.
For each of the next m-1 lines, each line contains two integer - the endpoints of an edge of B.
For each query, output a line containing one integer that stands for the answer.
For all test datas,,
,
.