#include<bits/stdc++.h>
using namespace std;
const int N = 1e5 + 9;
int fa[N];
bool vis[N];
int find(int x)
{
if(x == fa[x]) return x;
else{
return fa[x] = find(fa[x]);
}
}
void merge(int x, int y)
{
int nx = find(x); int ny = find(y);
if(nx == ny) return;
else...