#include <bits/stdc++.h>
using namespace std;
int t, h;
int gh;
int u, s[4];
bool vis[9999];
int info[9999][4];
void ask(int id) {
  printf("? %d\n", id);
  fflush(stdout);
  scanf("%d", &u);
  for (int i = (1); i <= (u); i++) scanf("%d", &s[i]);
  vis[id] = true;
  info[id][0] = u;
  for (int i = (1); i <= (u); i++) info[id][i] = s[i];
  return;
}
int Q[19], p;
int R[19], r;
int go(int x) {
  for (int i = (1); i <= (info[x][0]); i++) {
    int nx = info[x][i];
    if (!vis[nx]) {
      ask(nx);
      return nx;
    }
  }
  return -1;
}
int solve() {
  memset(vis, 0, sizeof(vis));
  Q[p = 1] = 1;
  ask(1);
  while (info[Q[p]][0] != 1) {
    if (info[Q[p]][0] == 2) return Q[p];
    Q[++p] = go(Q[p - 1]);
  }
  R[r = 1] = 1;
  while (info[R[r]][0] != 1) {
    if (info[R[r]][0] == 2) return R[r];
    R[++r] = go(R[r - 1]);
  }
  for (int i = (p + r - 1); i >= (r); i--) Q[i] = Q[i - r + 1];
  for (int i = (1); i <= (r - 1); i++) Q[i] = R[r + 1 - i];
  p = p + r - 1;
  assert(p % 2 == 1);
  int X = Q[(p + 1) / 2], H = h - (p - 1) / 2;
  while (H > 4) {
    R[r = 1] = go(X);
    while (info[R[r]][0] != 1) {
      if (info[R[r]][0] == 2) return R[r];
      R[++r] = go(R[r - 1]);
    }
    H = h - ((h - H) + r) / 2;
    X = R[r - (h - H)];
  }
  if (H == 2) return go(X);
  if (H == 3) {
    int A = go(X);
    int B = go(A);
    if (info[B][0] == 2)
      return B;
    else
      return go(A);
  }
  if (H == 4) {
    int A = go(X);
    int B = go(A);
    int C = go(A);
    int D;
    for (int i = (1); i <= (2); i++) {
      D = go(B);
      if (D != -1 && info[D][0] == 2) return D;
    }
    if (info[D = go(C)][0] == 2) return D;
    for (int i = (1); i <= (3); i++)
      if (!vis[info[C][i]]) return info[C][i];
  }
}
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &h);
    int ans = solve();
    printf("! %d\n", ans);
    fflush(stdout);
  }
  return 0;
}
