A tree is an undirected connected graph without cycles.

You are given a tree of n vertices. Find the number of ways to choose exactly k vertices in this tree (i. e. a k-element subset of vertices) so that all pairwise distances between the selected vertices are equal (in other words, there exists an integer c such that for all u, v (u ≠ v, u, v are in selected vertices) d_{u,v}=c, where d_{u,v} is the distance from u to v).

Since the answer may be very large, you need to output it modulo 10^9 + 7.

Input

The first line contains one integer t (1 ≤ t ≤ 10) — the number of test cases. Then t test cases follow.

Each test case is preceded by an empty line.

Each test case consists of several lines. The first line of the test case contains two integers n and k (2 ≤ k ≤ n ≤ 100) — the number of vertices in the tree and the number of vertices to be selected, respectively. Then n - 1 lines follow, each of them contains two integers u and v (1 ≤ u, v ≤ n, u ≠ v) which describe a pair of vertices connected by an edge. It is guaranteed that the given graph is a tree and has no loops or multiple edges.

Output

For each test case output in a separate line a single integer — the number of ways to select exactly k vertices so that for all pairs of selected vertices the distances between the vertices in the pairs are equal, modulo 10^9 + 7 (in other words, print the remainder when divided by 1000000007).

Example

Input


3

4 2
1 2
2 3
2 4

3 3
1 2
2 3

5 3
1 2
2 3
2 4
4 5


Output


6
0
1
#include <iostream>
#include <cmath>
#include <cctype>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <deque>
#include <stack>
#include <unordered_set>
#include <sstream>
#include <cstring>
#include <iomanip>
#include <queue>
#include <unordered_map>
#include <random>
#include <cfloat>
#include <chrono>
#include <bitset>
#include <complex>
#include <immintrin.h>
#include <cassert>

#define MOD 1'000'000'007

int32_t bin_pow(int32_t base, int32_t power) {
	if(power == 0)
		return 1;
	if(power == 1)
		return base;
	int32_t prev = bin_pow(base, power / 2);
	prev = ((int64_t)prev * prev) % MOD;
	if(power % 2 == 1)
		prev = ((int64_t)prev * base) % MOD;
	return prev;
}

int32_t* fact, *inv_fact;
int32_t cnk(int32_t n, int32_t k) {
	int32_t res = ((int64_t)fact[n] * inv_fact[k]) % MOD;
	return ((int64_t)res * inv_fact[n - k]) % MOD;
}

int main() {
	fact = new int32_t[200];
	inv_fact = new int32_t[200];
	fact[0] = 1;
	inv_fact[0] = 1;
	for(int32_t i = 1; i < 200; i++) {
		fact[i] = ((int64_t)fact[i - 1] * i) % MOD;
		inv_fact[i] = bin_pow(fact[i], MOD - 2);
	}

	int32_t num_tests;
	std::cin >> num_tests;

	for(int32_t t = 0 ;t < num_tests; t++) {
		int32_t n, k;
		std::cin >> n >> k;

		std::vector<int32_t>* tree = new std::vector<int32_t>[n];
		int32_t** dist = new int32_t*[n];
		for(int32_t i = 0; i < n; i++) {
			dist[i] = new int32_t[n];
			for(int32_t j = 0 ;j  < n; j++)
				dist[i][j] = 1'000'000;
			dist[i][i] = 0;
		}
		for(int32_t i = 0; i < n - 1; i++) {
			int32_t src, dst;
			std::cin >> src >> dst;
			src--;
			dst--;

			tree[src].push_back(dst);
			tree[dst].push_back(src);
			dist[src][dst] = 1;
			dist[dst][src] = 1;
		}

		for(int32_t p = 0; p < n; p++)
			for(int32_t i = 0; i < n; i++)
				for(int32_t j = 0; j < n; j++)
					dist[i][j] = std::min(dist[i][j], dist[i][p] + dist[p][j]);

		if(k == 2) {
			std::cout << n * (n - 1) / 2 << "\n";
			continue;
		}

		int32_t answer = 0;
		for(int32_t d = 1; d <= n - 1; d++) {
			for(int32_t i = 0; i < n; i++) {
				int32_t choices = 0;
				for(int32_t j = 0; j < n; j++)
					if(dist[i][j] == d)
						choices++;
				if(choices >= k) {
					answer += cnk(choices, k);
					answer %= MOD;
				}
			}
		}

		std::cout << answer << "\n";
	}
	return 0;
}