You are given an undirected graph of $$$n$$$ vertices numbered from $$$1$$$ to $$$n$$$. Initially, there are no edges.
You should process $$$q$$$ queries. There are two types of queries:
Note that the graph might contain multiple edges and/or self-loops.
After each query, find the maximum number of edges that can be deleted from the graph if the following conditions are satisfied:
Note that you don't actually delete the edges from the graph, you only calculate the maximum number of edges you can delete.
The first line contains two integers $$$n$$$ and $$$q$$$ ($$$1 \le n, q \le 3 \cdot 10^5$$$) — the number of vertices in the graph and the number of queries.
Each of the next $$$q$$$ lines contains three integers $$$t, u, v$$$ ($$$1 \le t \le 2$$$; $$$1 \le u, v \le n$$$) — the description of the query.
After each query, print one integer — the maximum number of edges you can delete from the graph.
4 51 3 32 4 41 1 22 1 21 1 2
0 2 2 2 4
5 92 2 51 4 11 5 32 5 11 1 32 3 21 4 22 4 41 3 5
0 0 0 0 0 2 2 4 4
| Name |
|---|


