unionFind f; graph g; char s[1d5][8]; int u[1d5],v[1d5]; { ll@n,@m,@q; rd(s(n),(u--,v--)(m)); f.walloc(7n,1); g.setEdge(n,m,u,v); rep(i,n){ rep[g.edge[i]](j,g.es[i]){ if(i