#include <bits/stdc++.h>
using namespace std;
map<int, vector<int>> Memo;
int limit = 16;
int res = -1;
vector<int> query(int v) {
  cerr << "query " << v << endl;
  if (Memo.find(v) != Memo.end()) return Memo[v];
  if (v == 1000 || res != -1) return {1000, 1000, 1000, 1000};
  if (limit == 0) exit(0);
  --limit;
  cout << "? " << v << endl;
  int X;
  cin >> X;
  if (X == 0) exit(0);
  if (X == 2) res = v;
  vector<int> R(X);
  for (int& r : R) {
    cin >> r;
    if (r == 0) return {};
  }
  return Memo[v] = R;
}
bool hasLeaf(int u, int ig, int d) {
  auto R = query(u);
  if (R.size() == 1) return true;
  if (d == 0) return false;
  for (int r : R)
    if (r != ig) {
      return hasLeaf(r, u, d - 1);
    }
}
int findDX(int n, int dXX, int dXXX) {
  vector<int> R = query(dXX);
  bool tested = false;
  for (int r : R) {
    if (r != dXXX) {
      if (tested) {
        return r;
      } else {
        if (!hasLeaf(r, dXX, n - 1)) return r;
        tested = true;
      }
    }
  }
}
int main() {
  int T;
  cin >> T;
  for (int t = 0; t < T; t++) {
    Memo.clear();
    limit = 16;
    res = -1;
    int H;
    cin >> H;
    if (H == 0) return 0;
    int beg = 1;
    vector<int> R = query(beg);
    if (R.size() == 2) {
      cout << "! 1" << endl;
      continue;
    }
    vector<pair<int, vector<int>>> Q, S;
    for (int r : R) Q.push_back({r, {beg, r}});
    int d = 1;
    int rootd = -1;
    if (R.size() == 1) rootd = 0;
    while (rootd == -1 && res == -1) {
      for (auto q : Q) {
        R = query(q.first);
        if (R.size() == 2) {
          res = q.first;
          break;
        } else if (R.size() == 1) {
          rootd = d;
        } else {
          q.second.push_back(q.first);
          for (int r : R)
            if (find(q.second.begin(), q.second.end(), r) == q.second.end()) {
              S.push_back({r, q.second});
              break;
            }
        }
      }
      Q.clear();
      swap(S, Q);
      ++d;
    }
    if (res != -1) {
      cout << "! " << res << endl;
      continue;
    }
    int cur = rootd == 0 ? R[0] : Q[0].second[1];
    int prev = beg;
    rootd = H - rootd;
    int d3 = -1, d4 = -1;
    if (rootd == 7) {
      prev = findDX(H - 6, cur, prev);
      swap(cur, prev);
    }
    if (rootd == 2) {
      for (int r : query(beg)) res = r;
    } else if (rootd == 3) {
      if (H == 3) {
        d3 = beg;
        d4 = -1;
      } else {
        for (int r : query(Q[0].second[1])) {
          if (H == 7) {
            if (r != beg && Q[0].second[2] != r) res = r;
          } else
            query(r);
        }
      }
    } else if (rootd == 4) {
      d3 = cur;
      d4 = beg;
    } else if (rootd == 5) {
      d4 = cur;
      d3 = findDX(H - 4, cur, prev);
    } else if (rootd >= 6) {
      d4 = findDX(H - 5, cur, prev);
      d3 = findDX(H - 4, d4, cur);
    }
    if (res != -1) {
      cout << "! " << res << endl;
      continue;
    }
    vector<int> D2 = query(d3);
    vector<int> D1;
    for (int d2 : D2) {
      if (d2 != d4) {
        for (int d1 : query(d2))
          if (d1 != d3) D1.push_back(d1);
      }
    }
    for (int d1 : D1) {
      if (limit == 0 && res == -1)
        res = d1;
      else
        query(d1);
    }
    cout << "! " << res << endl;
  }
}
