CSES - Bus lines
  • Time limit: 1.00 s
  • Memory limit: 128 MB

There are n cities and m bus lines in a country. Each bus line is bidirectional and connects two cities.

The country is divided into regions so that each region consists of all cities that are connected to each other through bus lines.

Unfortunately, due to the financial situation, k bus lines will be shut down. Sometimes the number of regions changes after shutting down a bus line.

Your task is to report the number of regions after each shutdown.

Input

The first input line contains three integers n, m and k. The cities are numbered 1,2,\ldots,n, and the bus lines are numbered 1,2,\ldots,m.

The following m lines describe the bus lines. Each line consists of two numbers a and b: the cities that the bus line connects.

The final line contains k integers and describes the shutdowns of the bus lines in the order in which they will happen.

Output

You should output k integers: the number of regions after each shutdown.

Constraints

  • 1 \le n, m \le 10^5
  • 1 \le k \le m
  • 1 \le a,b \le n

Example

Input:

6 5 4
1 2
2 3
2 4
3 4
5 6
1 5 4 2

Output:

3 4 4 5