#include #include using namespace std; #include using namespace atcoder; using ll = long long; int N,K; vector> G; vector A; vector depth; void dfs(int v,int p,int d){ depth[v] = d; for(int u:G[v]){ if(u==p) continue; dfs(u,v,d+1); } } void solve(){ depth = vector(N,0); dfs(0,-1,0); vector depthxor(N); for(int i = 0;i> T; for(int t= 0;t> N >> K; G = vector>(N); A.resize(N); for(int i = 0;i> u >> v; u--; v--; G[u].push_back(v); G[v].push_back(u); } for(int i = 0;i> A[i]; if(t==23)cerr<