0
13

# problem

$$n\le 10^5,m\le 5\times 10^5,k\le 15$$

# code

/*
* @Author: wxyww
* @Date:   2020-05-25 16:14:15
*/
#include<cstdio>
#include<iostream>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#include<queue>
#include<vector>
#include<ctime>
#include<cmath>
using namespace std;
typedef long long ll;
const int N = 500100;
ll x = 0,f = 1;char c = getchar();
while(c < '0' || c > '9') {
if(c == '-') f = -1; c = getchar();
}
while(c >= '0' && c <= '9') {
x = x * 10 + c - '0'; c = getchar();
}
return x * f;
}
int n,m;
struct node {
int v,nxt,w,id;
}e[N << 1];

void add(int u,int v,int id) {
}
int vis[N],w[N];

void dfs1(int u,int fa) {
vis[u] = 1;
for(int i = head[u];i;i = e[i].nxt) {
int v = e[i].v;
if(e[i].w || v == fa) continue;
if(vis[v]) {
e[i].w = e[i ^ 1].w = rand() + 1;
w[u] ^= e[i].w;w[v] ^= e[i].w;
continue;
}
dfs1(v,u);
}
}

void dfs2(int u,int fa) {
for(int i = head[u];i;i = e[i].nxt) {
int v = e[i].v;if(v == fa || e[i].w) continue;
dfs2(v,u);
w[u] ^= w[v];
e[i].w = e[i ^ 1].w = w[v];
}
}

int cnt,p[32];
int ins(int x) {

// printf("!!!%d\n",x);

for(int i = 30;i >= 0;--i) {
if(x >> i & 1) {
if(!p[i]) {p[i] = x;return 1;}
x ^= p[i];
}
}
return 0;
}
void solve() {
int k = read(),flag = 0;
for(int i = 1;i <= k;++i) {
int x = read() ^ cnt;
// printf("%d ",x);
if(flag) continue;
if(!ins(e[x << 1].w)) {
puts("Disconnected");
flag = 1;
continue;
}
}
// puts("");
if(!flag) {
++cnt;
puts("Connected");
}
}

int main() {
// freopen("1.in","r",stdin);

for(int i = 1;i <= m;++i) {
}

dfs1(1,0);
dfs2(1,0);