The first line contains an integer T, denoting the number of the test cases.
For each test case, the first line contains two integers n,k.
The next n-1 lines, each contains two integers a and b, denote there is an edge between a and b.
The next line contains n integers separated by a single space, denote each vertex's label in the order from 1 to n.
n,k <= 300. label <= 10^9.
T <= 20.