void tarjan(int x,int from){
dfn[x] = ++sz;
for (int i = head[x]; ~i; i = fail[i]) {
if (i == (from ^ 1)) continue;
int v = edge[i];
if (dfn[v]) {
if (dfn[v] < dfn[x]) continue;
cyc[x] = true;
for (; v != x; v = father[v]){ cyc[v] = true;}
}else father[v] = x, tarjan(v,i);
}
}