There are $n$ cities in the Rainbow Island, connected by $n - 1$ bidirectional roads. In the $i^{th}$ of each next $m$ years, $k_{i}$ of the cities would like to hold a party and they would choose one from these $k_{i}$ cities as the place for the party. For convenience, every year, the sum of distance from the chosen city to all of these $k_{i}$ cities should be minimized.
Now you are given the map of the Rainbow Island and the $k_{i}$ cities which would hold the party, calculate the minimized sum of distance from the chosen city to all of the $k_{i}$ cities every year.
输入格式
The first line contains an integer number T, the number of test cases.
For each test case :
The first line contains two integers $n$, $m$($1 \leq n , m\leq 100000$), number of cities and years.
The following $n - 1$ lines, each contains three integers $u, v, w$($1 \leq u, v \leq n$, $u \neq v$, $1 \leq w \leq 10^{9}$), which means there is a bidirectional road between $u$ and $v$, the length of road is $w$.
It's guaranteed that the graph is connected.
i-th of each next $m$ lines contains $k_{i} + 1$ integers, first is the number of cities for the party $k_{i}$($1 \leq k_{i} \leq n$), then come $k_{i}$ different integers $a_{1}$, $a_{2}$, ... , $a_{k_{i}}$($1 \leq a_{j} \leq n$, $1 \leq j \leq k_{i}$), the indexes of these $k_{i}$ cities.
It's also guaranteed that for each test case $\sum k_{i} \leq 100000$.