#include <bits/stdc++.h>   using namespace std;   const int N = 2e5 + 100;   const int M = 26;   const long long mod = 1e9 + 7;   const long long MOD = 998244353;   const int P = 1336;   const long double eps = 0.000000001;   const long long inf = 1e18 + 7;   mt19937 gen(time(0));   vector<int> g[N];   int sz[N], a[N];   int ask(int v, int u) {     cout <<  ?   << v + 1 <<     << u + 1 << endl;     int c;     cin >> c;     if (c == -1) exit(0);     c--;     return c;   }   void answ(int v) {     cout <<  !   << v + 1 << endl;     exit(0);   }   int32_t main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     int n;     cin >> n;     for (int i = 0; i < n - 1; i++) {       int x, y;       cin >> x >> y;       x--;       y--;       g[x].push_back(y);       g[y].push_back(x);       sz[x]++;       sz[y]++;     }     for (int i = 0; i < n; i++) {       a[i] = 1;     }     int can = n / 2;     while (can--) {       int v = -1, u = -1;       for (int i = 0; i < n; i++) {         if (sz[i] == 1) {           if (v == -1)             v = i;           else if (u == -1)             u = i;         }       }       for (auto to : g[v]) {         sz[to]--;       }       for (auto to : g[u]) {         sz[to]--;       }       sz[v]--;       sz[u]--;       int c = ask(v, u);       if (c == v) answ(v);       if (c == u) answ(u);       a[v] = 0;       a[u] = 0;     }     for (int i = 0; i < n; i++) {       if (a[i]) answ(i);     }   }   