#include <bits/stdc++.h>
using namespace std;
long long x, y;
map<long long, vector<long long> > memo;
bool visited[150];
long long ask;
vector<long long> query(long long node) {
  if (visited[node]) return memo[node];
  long long a, b, c, d, e, f;
  vector<long long> res;
  printf("? %lld\n", node);
  fflush(stdout);
  ask++;
  scanf("%lld", &a);
  for (b = 1; b <= a; b++) {
    scanf("%lld", &c);
    res.push_back(c);
  }
  visited[node] = 1;
  return memo[node] = res;
}
long long finddep(long long node, long long previ, long long maxdep) {
  long long a, b, c, d, e, f, g, h;
  for (b = 1; b <= maxdep; b++) {
    vector<long long> nei = query(node);
    if (nei.size() == 1) return b;
    for (c = 0; c < nei.size() && nei[c] == previ; c++)
      ;
    previ = node;
    node = nei[c];
  }
  return 1e18;
}
long long solve(long long node, long long previ, long long level) {
  if (level == 1) return node;
  long long a, b, c, d, e, f, g, h;
  if (level * 2 <= x) {
    queue<pair<pair<long long, long long>, long long> > frd;
    frd.push({{node, previ}, 0});
    while (!frd.empty()) {
      if (frd.size() == 1 && frd.front().first.first != node) {
        return frd.front().first.first;
      }
      a = frd.front().first.first;
      c = frd.front().first.second;
      d = frd.front().second;
      frd.pop();
      vector<long long> nei = query(a);
      if (nei.size() == 2) return a;
      if (d == 2) continue;
      for (b = 0; b < nei.size(); b++) {
        if (nei[b] == c) continue;
        frd.push({{nei[b], a}, d + 1});
      }
    }
  }
  vector<long long> nei = query(node);
  for (b = 0; b < nei.size() && nei[b] != previ; b++)
    ;
  nei.erase(nei.begin() + b);
  e = finddep(nei[0], node, x - level);
  if (e == x - level)
    return solve(nei[1], node, level - 1);
  else
    return solve(nei[0], node, level - 1);
}
int main() {
  long long a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q;
  scanf("%lld", &a);
  for (b = 1; b <= a; b++) {
    scanf("%lld", &x);
    if (!x) continue;
    memset(visited, 0, sizeof(visited));
    ask = 0;
    y = 0;
    memo.clear();
    vector<long long> nei = query(1);
    if (nei.size() == 1) {
      e = solve(nei[0], 1, x - 1);
    } else if (nei.size() == 2) {
      e = 1;
    } else {
      c = finddep(nei[0], 1, x - 2);
      d = finddep(nei[1], 1, x - 2);
      if (c > d)
        e = solve(nei[0], 1, x - d - 1);
      else if (d > c)
        e = solve(nei[1], 1, x - c - 1);
      else
        e = solve(nei[2], 1, x - c - 1);
    }
    printf("! %lld\n", e);
    fflush(stdout);
  }
  return 0;
}
