Give an connected undirected graph with $n$ nodes and $m$ edges, ($n,m\leq 10^5$) which has no selfloops or multiple edges $initially$.
Now we have $q$ operations ($q\leq 10^5$):
$\cdot 1\ u\ v$: add an undirected edge from $u$ to $v$; $(u \neq v\&\& 1 \leq u,v \leq n)$
$\cdot 2\ u\ v$: count the number of $mustedges$ from $u$ to $v$; $(1 \leq u,v \leq n)$.
$mustedge$: we define set $E_i$ as a path from $u$ to $v$ which contain edges in this path, and $| \cap_1^kE_i |$ is the number of $mustedges$. $| x |$ means size of set $x$, and $E_1, E_2\dots E_k$ means all the paths.
It's guaranteed that $\sum{n},\sum{m},\sum{q}\leq 10^6$
Please note that maybe there are more than one edges between two nodes after we add edges. They are not the same, which means they can be in a set at the same time. Read the sample data for more information.