#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; vector> UV(N-1); vector> Graph(N); for(int i=0; i> u >> v; u--; v--; Graph.at(u).push_back(v); Graph.at(v).push_back(u); UV.at(i) = {u,v}; } int query = 0; auto ask = [&](vector X) -> bool { if(query == 15) assert(false); query++; cout << "?"; for(int i=0; i> ret; if(ret == "Yes") return true; if(ret == "No") return false; assert(false); }; vector ord; vector depth(N); { auto dfs = [&](auto dfs,int pos,int back,int dep) -> void { ord.push_back(pos); depth.at(pos) = dep; for(auto to : Graph.at(pos)) if(to != back) dfs(dfs,to,pos,dep^1); }; dfs(dfs,0,-1,0); } vector X(N-1); for(int i=0; i 1){ int mid = (high+low)/2; vector OK(N); for(int i=0; i