The first line contains an positive integer $T$, represents there are $T$ test cases.
For each test case:
The first line contains two positive integers $n$ and $k$, represent the tree has $n$ nodes, $k$ leaf nodes of which have already been setted their beautiful levels.
The next $(n-1)$ lines, each line contains two distinct positive integers $u$ and $v$, repersent there is an undirected edge between node $u$ and node $v$.
The next $k$ lines, each lines contains two positive integers $u$ and $w$, repersent node $u$ is a leaf node, whose beautiful level is $w$.
There is a blank between each integer with no other extra space in one line.
It's guaranteed that the input edges constitute a tree.
$1\leq T\leq 10,2\leq n\leq 5\cdot10^4,1\leq k\leq n,1\leq u,v\leq n,1\leq w\leq 10^9$