#include <bits/stdc++.h>   int height;   std::vector<int> graph[1 + 127];   bool mark[1 + 127];   int answer;   void setup(void) {     scanf( %d , &height);     for (int i = 1; i <= 127; i++) {       graph[i].clear();       mark[i] = false;     }     answer = 0;   }   void ask(int v) {     if (!graph[v].empty()) {       return;     }     printf( ? %d n , v);     fflush(stdout);     int k;     scanf( %d , &k);     if (k == 0) exit(0);     for (int i = 0; i < k; i++) {       int u;       scanf( %d , &u);       graph[v].push_back(u);     }     if (k == 2) answer = v;   }   void guess(int v) {     printf( ! %d n , v);     fflush(stdout);   }   int find_leaf(int v, std::list<int>& path, bool prepend) {     ask(v);     mark[v] = true;     if (graph[v].size() == 1) return v;     for (auto u : graph[v]) {       if (!mark[u]) {         if (prepend)           path.push_front(u);         else           path.push_back(u);         return find_leaf(u, path, prepend);       }     };     throw -1;   }   int following(int v) {     for (auto u : graph[v])       if (!mark[u]) return u;     return v;   }   bool reachable(int v, int parent, int depth) {     ask(v);     if (depth == 0) return true;     if (answer) {       return true;     }     for (auto u : graph[v]) {       if (u != parent) return reachable(u, v, depth - 1);     }     return false;   }   bool within(int v, int parent, int depth) {     ask(v);     if (answer) {       return true;     }     if (depth > 0) {       for (auto u : graph[v]) {         if (u != parent && within(u, v, depth - 1)) return true;       }     }     return false;   }   int main(void) {     int t;     scanf( %d , &t);     while (t--) {       setup();       if (height == 0) break;       std::list<int> path;       path.push_front(1);       find_leaf(1, path, true);       find_leaf(1, path, false);       int altitude = path.size() / 2 + 1;       int par = *std::next(path.begin(), altitude - 1);       int v = following(par);       altitude++;       for (; altitude < height && altitude < 5 && !answer; altitude++) {         ask(v);         int u, w;         if (graph[v][0] == par) {           u = graph[v][1];           w = graph[v][2];         } else if (graph[v][1] == par) {           u = graph[v][0];           w = graph[v][2];         } else {           u = graph[v][0];           w = graph[v][1];         }         int next;         if (reachable(u, v, altitude)) {           next = u;         } else {           next = w;         }         par = v;         v = next;       };       if (!answer) {         if (altitude == height + 1) {           answer = par;         } else if (altitude == height) {           answer = v;         } else {           ask(v);           std::vector<int> candidates;           if (altitude == height - 1) {             ;             for (auto u : graph[v]) {               if (u != par) candidates.push_back(u);             }           } else if (altitude == height - 2) {             ;             for (auto u : graph[v]) {               if (u != par) {                 ask(u);                 candidates.push_back(u);                 for (auto w : graph[u]) {                   if (w != v) candidates.push_back(w);                 }               }             }           } else {             ;             throw -1;           }           for (int i = 0; i < (int)candidates.size() - 1; i++) {             ask(candidates[i]);           }           if (!answer) {             answer = candidates[candidates.size() - 1];           }         }       }       guess(answer);     }     return 0;   }