#include <bits/stdc++.h>
using namespace std;
struct abcd {
  int to, next;
} table[200 << 1];
int head[200], tot;
void Add(int x, int y) {
  table[++tot].to = y;
  table[tot].next = head[x];
  head[x] = tot;
}
bool v[200];
int q[100], l, r, cnt;
int k, a[3];
void Initialize() {
  memset(v, 0, sizeof v);
  l = 51;
  r = 50;
  memset(head, 0, sizeof head);
  tot = 0;
  cnt = 0;
}
bool Ask(int x) {
  if (cnt == 16) {
    printf("! %d\n", x);
    fflush(stdout);
    return true;
  }
  printf("? %d\n", x);
  fflush(stdout);
  ++cnt;
  v[x] = true;
  scanf("%d", &k);
  for (int i = 0; i < k; i++) scanf("%d", &a[i]);
  if (k == 2) {
    printf("! %d\n", x);
    fflush(stdout);
    return true;
  }
  for (int i = 0; i < k; i++) Add(x, a[i]);
  return false;
}
void Solve() {
  int H;
  Initialize();
  scanf("%d", &H);
  if (Ask(1)) return;
  q[++r] = 1;
  while (1) {
    int i;
    for (i = head[q[l]]; i; i = table[i].next)
      if (!v[table[i].to]) {
        if (Ask(table[i].to)) return;
        q[--l] = table[i].to;
        break;
      }
    if (!i) break;
  }
  while (1) {
    int i;
    for (i = head[q[r]]; i; i = table[i].next)
      if (!v[table[i].to]) {
        if (Ask(table[i].to)) return;
        q[++r] = table[i].to;
        break;
      }
    if (!i) break;
  }
  r = l + r >> 1;
  while (r - l + 1 <= 3) {
    while (1) {
      int i;
      for (i = head[q[r]]; i; i = table[i].next)
        if (!v[table[i].to]) {
          if (Ask(table[i].to)) return;
          q[++r] = table[i].to;
          break;
        }
      if (!i) break;
    }
    r = l + r >> 1;
  }
  static int q[110];
  int r = 0, h = 0;
  int x = ::q[::r];
  for (int i = head[x]; i; i = table[i].next)
    if (!v[table[i].to]) q[++r] = table[i].to;
  while (r != h) {
    int x = q[++h];
    if (Ask(x)) return;
    for (int i = head[x]; i; i = table[i].next)
      if (!v[table[i].to]) q[++r] = table[i].to;
  }
}
int main() {
  int T;
  cin >> T;
  for (; T; T--) Solve();
}
