#ds502. 图染色

图染色

Graph Coloring

Problem Description

You are given a graph with nn nodes and mm edges. Each node is initially white.

You must support qq operations:

  1. 1 x: flip the color of node xx (black to white, or white to black).
  2. 2 x: query how many black neighbors node xx has.

Input Format

The first line contains three integers nn, mm, and qq (1≤n≤2×1051 \le n \le 2 \times 10^5, 1≤m≤4×1051 \le m \le 4 \times 10^5, 1≤q≤4×1051 \le q \le 4 \times 10^5).

The following mm lines each contain two integers uu and vv (1≤u,v≤n1 \le u, v \le n, u≠vu \neq v), representing an edge. There are no duplicate edges.

The following qq lines each contain two integers describing an operation.

Output Format

For each query operation, output one line containing a number: the answer.

Sample Input

3 3 5
1 2
2 3
1 3
2 1
1 2
1 3
2 1
2 2

Sample Output

0
2
1

Constraints

1≤n≤2×1051 \le n \le 2 \times 10^5, 1≤m≤4×1051 \le m \le 4 \times 10^5, 1≤q≤4×1051 \le q \le 4 \times 10^5.