#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream& operator<<(ostream& s, vector<T> t) {
  for (int i = 0; i < (t.size()); i++) s << (i ? " " : "") << t[i];
  return s;
}
template <typename T>
istream& operator>>(istream& s, vector<T>& t) {
  for (int i = 0; i < (t.size()); i++) s >> t[i];
  return s;
}
const int H = 7;
const int N = 1 << H;
vector<int> adj[N];
int father[N];
int asked = 0;
void ask(int x) {
  cout << "? " << x << endl << flush;
  asked++;
  int k;
  cin >> k;
  adj[x].resize(k);
  cin >> adj[x];
}
bool ans(int x) {
  if (adj[x].size() == 2) {
    cout << "! " << x << endl << flush;
    return true;
  }
  return false;
}
void solve() {
  for (int i = 0; i < (N); i++) adj[i].clear(), father[i] = 0;
  int h;
  cin >> h;
  int last = -1, cur = 1;
  int len = 0;
  vector<int> v;
  do {
    v.push_back(cur);
    ask(cur);
    if (ans(cur)) return;
    if (adj[cur].size() == 1) break;
    for (int i = 0; i < (3); i++) {
      if (adj[cur][i] != last) {
        last = cur;
        cur = adj[cur][i];
        break;
      }
    }
    len++;
  } while (true);
  reverse(v.begin(), v.end());
  if (v.size() == 1) v.push_back(adj[v[0]][0]);
  int conf = (len + 2) / 2;
  while (conf < 4) {
    conf = max(conf, (int)(v.size() + 1) / 2);
    for (int i = 0; i < (conf); i++) {
      father[v[i]] = v[i + 1];
    }
    cur = v.back();
    if (adj[v.back()].size() == 0) {
      ask(v.back());
    }
    if (ans(v.back())) return;
    assert(adj[cur].size() != 1);
    int nx = -1;
    for (int i = 0; i < (3); i++) {
      if (father[adj[cur][i]] != cur && adj[adj[cur][i]].size() == 0) {
        nx = adj[cur][i];
        break;
      }
    }
    ask(nx);
    if (ans(nx)) return;
    v.push_back(nx);
    if (adj[nx].size() == 1) {
      assert(v.size() % 2);
      int mid = v[v.size() / 2];
      while (v.back() != mid) {
        father[v[v.size() - 1]] = v[v.size() - 2];
        v.pop_back();
      }
      conf = v.size();
      for (int i = 0; i < (3); i++) {
        if (father[adj[v.back()][i]] != v.back()) {
          v.push_back(adj[v.back()][i]);
          break;
        }
      }
      if (adj[v.back()].size() == 0) {
        ask(v.back());
      }
      if (ans(v.back())) return;
    }
  }
  while (v.size() > conf + 1) v.pop_back();
  set<int> prevL = {v[3]};
  vector<int> layer = {v[4]};
  for (int i = 0; i < (3); i++) {
    vector<int> nxl;
    for (auto x : layer) {
      if (adj[x].size() == 0) {
        if (asked == 16) {
          cout << "! " << x << endl << flush;
          return;
        }
        ask(x);
      }
      if (ans(x)) return;
      for (int j = 0; j < (3); j++) {
        if (!prevL.count(adj[x][j])) nxl.push_back(adj[x][j]);
      }
      prevL.insert(x);
    }
    layer = nxl;
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
    asked = 0;
  }
}
