In some countries building highways takes a lot of time... Maybe that's because there are many possiblities to construct a network of highways and engineers can't make up their minds which one to choose. Suppose we have a list of cities that can be connected directly. Your task is to count how many ways there are to build such a network that between every two cities there exists exactly one path. Two networks differ if there are two cities that are connected directly in the first case and aren't in the second case. At most one highway connects two cities. No highway connects a city to itself. Highways are two-way.  A path X-Y-W-A is the same as the path A-Y-W-A.


Input

The input is to be read from the standard input of your program. It begins with an integer 't', the number of test cases (equal to about 1000), followed by a new line, followed by the 't' test cases.


The first line of each test case contains two integers, the number of cities (1 ≤ n ≤ 12) and the number of direct connections between them.
Each next line contains two integers, which are the specific numbers of cities that can be connected. Cities are numbered from 1 to n.
Consecutive test cases are separated with one blank line. The last line of input is terminated by a newline.




Output

The number of ways to build the network, for every test case in a separate line. Assume that when there is only one city, the answer should be 1. The answer will fit in a signed 64-bit integer.


Example
Sample input:
4
4 5
3 4
4 2
2 3
1 2
1 3

2 1
2 1

1 0

3 3
1 2
2 3
3 1

Sample output:
8
1
1
3
#!/usr/bin/python
#Filename: happy.py

def getInt():
	while True:
		s=raw_input().strip()
		if(s!=""): return int(s)

def getString():
	while True:
		s = raw_input()
		if(s!=""): return s

def det(A,n):
	r=1
	for i in range(n):
		for j in range(i+1,n):
			 while(A[j][i]!=0):  # non-zero, swap with row i :)
				 f = A[i][i]/A[j][i]
				 for k in range(i,n):
					 A[i][k] = A[i][k] - A[j][k]*f
				 for k in range(i,n):
					 t = A[i][k]
					 A[i][k] = A[j][k]
					 A[j][k] = t
		r = r * A[i][i]
	return abs(r)


kases = getInt()
for kase in range(kases):
	G = []

	sa = getString().split()
	n = int(sa[0])
	m = int(sa[1])
	
	A = []
	for i in range(n):
		t = []
		for j in range(n):
			t.append(0)
		A.append(t)

	for i in range(m):
		sa = getString().split()
		a = int(sa[0])-1
		b = int(sa[1])-1
		if(a!=b):
			A[a][b]-=1
			A[b][a]-=1
			A[a][a]+=1
			A[b][b]+=1

	if(n==1): print "1"
	else:
		print det(A,n-1)