The first line contains a positive integer $T(1\leq T\leq 500)$ representing the number of test cases.
For each test case, the first line contains two positive integers $n,m(1\leq n,m\leq 10^5)$, the number of nodes and roses.
The $i$-th line of the following $n-1$ lines contains two positive integers $u_i,v_i$,representing a branch in the tree which links node $u_i$ and $v_i$.
The $i$-th line of the following $m$ lines contains three non-negative integers $x_i,r_i,v_i(1\leq x_i\leq n,1\leq r_i,v_i\leq 10^9)$, describing the $i$-th rose.
There are at most $12$ test cases with $n+m>2000$