There is a city with $N$ numbered $0 - N-1$ shops. A market is a place where we can reach from one shop to another using some road. There are $M$ roads in this city connecting each connecting any two shops. 
Find the number of markets in the city.
NOTE:  A market having only one shop is also a valid market.

-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow. 
- First line of Each Test Case is $N, M$, denoting the number of shops and the number of roads respectively.
- Next M lines consist of two integers $A$ and $B$ denoting that there exists a road between Shop A and Shop B

-----Output:-----
For each testcase, output the number of markets.

-----Constraints-----
- $1 \leq T \leq 100$
- $1 \leq N,M \leq 10^3$
- $0 \leq A,B < N$

-----Sample Input:-----
1
5 3
0 1
2 3
3 4

-----Sample Output:-----
2

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = '# cook your dish here\n\'\'\'\n\nWelcome to GDB Online.\nGDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,\nC#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.\nCode, Compile, Run and Debug online from anywhere in world.\n\n\'\'\'\n"""*****     *****\n *******   *******\n********* *********\n*******************\n *****************\n  ****TITLI******\n   *************\n    ***********\n     *********\n      *******\n       *****\n        ***\n         *"""\nimport sys\nfrom sys import stdin,stdout\nimport math\nimport time\nimport random\nfrom functools import lru_cache\nfrom collections import Counter\nimport heapq\n#@lru_cache(maxsize=None) #for optimizing the execution time of callable objects/functions(placed above callable functions)\ndef Update(X,AX,BX,CX,DX,k,n):\n    for i in range(k,n):\n        tem=(((AX*X[i-2])+(BX*X[i-1])+CX)%DX)+1\n        X.append(tem)\ndef my_function():\n  print("Hello from a function")\n        \n        \n        \n        \n"""def changeme( mylist ):\n   "This changes a passed list into this function"\n   mylist.append([1,2,3,4]);\n   print "Values inside the function: ", mylist\n   returnd=[art[i+1]-art[i] for i in range(na-1)]\n        y=list(set(d))\n        ns=float(\'-inf\')\n        p=1\n        while p<na:\n                d=art[p]-art[p-1]\n                smy=1\n                while p<na and(art[p]-art[p-1]==d):\n                       p+=1\n                       smy+=1\n                       ns=max(ns,smy)\n           s,v=map(int,input().split())\n            addEdge(adj,s,v)\n        DFS(adj,0,n)\n\ndef DFS_REC(adj,s,visited):\n    visited[s]=True\n    for s in adj[s]:\n        if not visited[s]:\n            DFS_REC(adj,s,visited)\ndef DFS(adj,src,n):\n    visited=[False]*n\n    ans=0\n    for i in range(n):\n        if not visited[i]:\n            ans+=1\n            DFS_REC(adj,i,visited)\n    print(ans)\ndef addEdge(adj,u,v):\n    adj[u].append(v)\n    adj[v].append(u)"""\ndef a(adj,s,visited):\n    visited[s]=True\n    for s in adj[s]:\n        if not visited[s]:\n            a(adj,s,visited)\ndef b(adj,src,n):\n    visited=[False]*n\n    ans=0\n    for i in range(n):\n        if not visited[i]:\n            ans+=1\n            a(adj,i,visited)\n    print(ans)\n\n\n\n\ndef e(adj,s,v):\n    adj[s].append(v)\n    adj[v].append(s)\n\ntry:\n    for _ in range(int(input())):\n        n,m=list(map(int,input().split()))\n        adj=[[] for i in range(n+1)]\n        for i in range(m):\n            s,v=list(map(int,input().split()))\n            e(adj,s,v)\n        b(adj,0,n)\n       \n       \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n   \n       \n       \n   \n       \n       \n       \n               \n        \nexcept EOFError as e:\n    print(e)\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 14611