Insane Transferable Abnormal Illness, ITAI for short, is a viral disease first found in the southern part of a city. A person who catches the virus screams "Itai, itai!" without stopping.
When the virus appears in a city it splits in two and travels along every road that touches that city. The city it started from keeps the virus as well. The ITAI virus is weak: once it reaches another city it degenerates into a weak virus that never spreads again.
A country has N cities, numbered 1 to N, and M roads. The Ministry of Health inspected the country and found the virus in K cities. Every one of those K cities holds a new virus that can still spread.
Find how many cities hold the virus after all of the spreading is over.
The first line has the number of test cases T. (1≤T≤10)
Each test case is given in the following format.
For each test case, print the number of cities that hold the virus on its own line.
The cities that hold the virus are the cities where the virus was found together with the cities joined to them by a single road. A city that can only be reached by crossing two or more roads stays clean.