ITAI Virus

No attempts yetTime limit1sMemory limit256 MB

Problem

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 NN cities, numbered 1 to NN, and MM roads. The Ministry of Health inspected the country and found the virus in KK cities. Every one of those KK cities holds a new virus that can still spread.

Find how many cities hold the virus after all of the spreading is over.

Input

The first line has the number of test cases TT. (1T101 \le T \le 10)

Each test case is given in the following format.

  • The first line has the number of cities NN, the number of roads MM, and the number of cities where the virus was found KK. (1N10001 \le N \le 1000, 1M2N1 \le M \le 2N, 0KN0 \le K \le N)
  • The next MM lines each have two integers AA and BB describing a road. (1AN1 \le A \le N, 1BN1 \le B \le N) The road connects city AA and city BB in both directions. Several roads may connect the same pair of cities, and AA may equal BB.
  • The next line has the KK numbers of the cities where the virus was found. If KK is 0, this line is empty.

Output

For each test case, print the number of cities that hold the virus on its own line.

Hint

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.