Kitty has a tree T, consisting of n nodes where each node is uniquely labeled from 1 to n. Her friend Alex gave her q sets, where each set contains distinct nodes. Kitty needs to calculate the following expression on each set:
where:
{u,v} denotes an unordered pair of nodes belonging to the set.
dist(u,v) denotes the number of edges on the unique (shortest) path between nodes u and v.
Given T and q sets of k distinct nodes, calculate the expression for each set. For each set of nodes, print the value of the expression modulo 109+7 on a new line.
The first line contains two integers: the number n (1≤n≤2⋅105) of nodes in tree T and q (1≤q≤105) — the number of nodes in the query set.
Each of the n−1 subsequent lines contains two integers a and b (1≤a,b≤n), that describe an undirected edge between nodes a and b.
The 2⋅q subsequent lines define each set over two lines in the following format:
The first line contains an integer k — the size of the set;
The second line contains k integers, the set's elements (1≤ki≤105, the sum of ki over all q does not exceed 2⋅105).
Print q lines where each line i contains the expression for the i-th query, modulo 109+7.