#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);
  R.erase(remove(R.begin(), R.end(), dXXX), R.end());
  bool tested = false;
  for (int r : R) {
    if (tested) {
      return r;
    } else {
      if (!hasLeaf(r, dXX, n - 1)) return r;
      tested = true;
    }
  }
}
int solve(int H);
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;
    cout << "! " << solve(H) << endl;
  }
}
int solve(int H) {
  int beg = 1;
  vector<int> R = query(beg);
  if (R.size() == 2) return beg;
  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;
  if (H == 2) return R[0];
  while (rootd == -1 && res == -1) {
    for (auto q : Q) {
      R = query(q.first);
      if (R.size() == 2) {
        return q.first;
      } 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) return res;
  int cur = rootd == 0 ? R[0] : Q[0].second[1];
  int prev = beg;
  if (rootd == 0 && H == 3) {
    cur = beg;
    prev = -1;
  }
  if (H == 3 + rootd && H > 3) {
    for (int r : query(Q[0].second[1])) {
      if (H == 7) {
        if (r != beg && Q[0].second[2] != r) res = r;
      } else
        query(r);
    }
  }
  rootd = H - rootd;
  while (rootd > 4) {
    prev = findDX(H - (--rootd), cur, prev);
    swap(cur, prev);
  }
  if (res != -1) return res;
  for (int d2 : query(cur))
    if (d2 != prev)
      for (int d1 : query(d2))
        if (d1 != cur)
          if (limit == 0 && res == -1)
            return d1;
          else
            query(d1);
  return res;
}
