Chef Shifu wanted to celebrate the success of his new restaurant with all his employees. He was willing to host a party and he had decided the location of the party as well. However, Chef Shifu was a shy person and wanted to communicate with the least possible employees to inform them about the party, and that these employees could inform their friends.

Note that an employee could only inform his/her immediate friends about the party, not his/her friends’ friends.

Chef Shifu has a list of all the friendships among his employees. Help him find the minimum number of employees he should inform, so that every employee knows about the celebration party.

-----Input-----
First line contains a single integer T - the total number of testcases.

T testcases follow. For each testcase:

The first line contains 2 space-separated integers N and M - the total number of employees working under Chef Shifu and the number of friendship relations.

M lines follow - each line contains 2 space-separated integers u and v, indicating that employee u is a friend of employee v and vice-versa.

The employees are numbered from 1 to N, and each employee is assigned a distinct integer.



-----Output-----
For each testcase, print the minimum number of employees to be informed on a new line.

-----Constraints-----
Subtask 1: 5 points

1 ≤ T ≤ 5

1 ≤ N ≤ 4

0 ≤ M ≤ N*(N-1)/2



Subtask 2: 35 points

1 ≤ T ≤ 5

1 ≤ N ≤ 15

0 ≤ M ≤ N*(N-1)/2



Subtask 3: 60 points

1 ≤ T ≤ 5

1 ≤ N ≤ 20

0 ≤ M ≤ N*(N-1)/2


-----Example-----
Input
2
3 3
1 2
2 3
1 3
4 3
1 2
2 3
3 4

Output
1
2

Explanation

In testcase 1, since every employee is a friend of every other employee, we just need to select 1 employee.
In testcase 2, selecting employees 2 and 4 would ensure that all 4 employees are represented.

Similarly, selecting employees 1 and 3 would also ensure that all 4 employees are selected.

In both cases, we must select 2 employees in the best case.

Starter code:

Solutions:
t=int(input())
for _ in range(t):
    n,m=map(int,input().split())
    mat=[0 for i in range(n)]
    #mat=[[0 for i in range(n)] for j in range(n)]
    for i in range(m):
     u,v=map(int,input().split())
     u,v=(u-1),(v-1)
     mat[u]|=(1<<v)
     mat[v]|=(1<<u)
    for i in range(n):
     mat[i]|=(1<<i)    
 
    goal=(2**n)-1
    ans=n

    for i in range(1,goal+1):
     mvs=0
     loc=0
     for j in range(n):
      if(i&(1<<j)):
       loc|=mat[j]
       mvs+=1
     if(loc==goal):
      ans=min(mvs,ans)
    print(ans)

t=int(input())
for _ in range(t):
    n,m=map(int,input().split())
    mat=[[0 for i in range(n+1)] for j in range(n+1)]
    for i in range(m):
     u,v=map(int,input().split())
     mat[u][v]=1
     mat[v][u]=1
    ord=[]
    for i in range(n+1):
     ord.append([sum(mat[i]),i])
    ord.sort(reverse=True)
    moves=[]
    tld=0
    ord=ord[:-1]
    for k in range(n):
     mv=0
     for i in range(n):
      loc=ord[(i+k)%n][1]
      if(mat[loc][0]!=1):
       mv+=1
       for j in range(1,n+1):
        if(mat[loc][j]==1 and mat[j][0]!=1):
         mat[j][0]=1
     moves.append(mv)
    print(min(moves))