#include <bits/stdc++.h>
using namespace std;
bool used[1000];
int l[1000], a[1000][4];
int que[1000];
int T;
int H;
int kkk[1000];
int cnt;
void get(int x) {
  if (used[x]) return;
  printf("? %d\n", x);
  cnt += 1;
  fflush(stdout);
  used[x] = true;
  scanf("%d", &l[x]);
  for (int i = 1; i <= l[x]; i++) scanf("%d", &a[x][i]);
}
void out(int x) { printf("! %d\n", x); }
void doit() {
  cnt = 0;
  scanf("%d", &H);
  memset(used, false, sizeof used);
  get(1);
  int q = 20, h = 20;
  if (l[1] == 2) {
    out(1);
    fflush(stdout);
    return;
  }
  if (l[1] == 3) {
    que[q] = 1;
    que[++h] = a[1][1];
    while (get(que[h]), l[que[h]] > 1) {
      for (int i = 1; i <= l[que[h]]; i++)
        if (a[que[h]][i] != que[h - 1]) {
          que[h + 1] = a[que[h]][i];
          h++;
          break;
        }
    }
    que[--q] = a[1][2];
    while (get(que[q]), l[que[q]] > 1) {
      for (int i = 1; i <= l[que[q]]; i++)
        if (a[que[q]][i] != que[q + 1]) {
          que[q - 1] = a[que[q]][i];
          q--;
          break;
        }
    }
  } else {
    que[q] = 1;
  }
  int now = que[(q + h) / 2];
  int depth = H - (h - q) / 2;
  while (true) {
    if (depth <= 4) {
      if (depth == 1) {
        out(now);
        fflush(stdout);
        return;
      }
      depth -= 1;
      for (int i = 1; i <= l[now]; i++)
        if (!used[a[now][i]]) {
          now = a[now][i];
          break;
        }
      if (depth == 1) {
        out(now);
        fflush(stdout);
        return;
      } else if (depth == 2) {
        get(now);
        int kk[10];
        int len = 0;
        for (int i = 1; i <= l[now]; i++)
          if (!used[a[now][i]]) kk[++len] = a[now][i];
        for (int i = 1; i < len; i++) {
          get(kk[i]);
          if (l[kk[i]] == 2) {
            out(kk[i]);
            fflush(stdout);
            return;
          }
        }
        out(kk[len]);
        fflush(stdout);
        return;
      } else {
        get(now);
        int ss[10];
        int len1 = 0;
        int kk[10];
        int len = 0;
        for (int i = 1; i <= l[now]; i++)
          if (!used[a[now][i]]) ss[++len1] = a[now][i];
        for (int i = 1; i <= len1; i++) {
          get(ss[i]);
          for (int j = 1; j <= l[ss[i]]; j++)
            if (!used[a[ss[i]][j]]) kk[++len] = a[ss[i]][j];
        }
        for (int i = 1; i < len; i++) {
          get(kk[i]);
          if (l[kk[i]] == 2) {
            out(kk[i]);
            fflush(stdout);
            return;
          }
        }
        out(kk[len]);
        fflush(stdout);
        return;
      }
    }
    q = h = 0;
    que[h] = now;
    while (true) {
      get(que[h]);
      if (l[que[h]] == 1 && h > 0) break;
      if (l[que[h]] == 2) {
        out(que[h]);
        fflush(stdout);
        return;
      }
      for (int i = 1; i <= l[que[h]]; i++)
        if (!used[a[que[h]][i]]) {
          que[h + 1] = a[que[h]][i];
          h++;
          break;
        }
    }
    int dd = H - depth;
    now = que[(h - dd) / 2];
    depth -= (h - dd) / 2;
  }
}
int main() {
  scanf("%d", &T);
  while (T--) {
    doit();
  }
}
