#include <bits/stdc++.h>
using namespace std;
int IN() {
  int x = 0, f = 0, ch;
  for (; (ch = getchar()) < '0' || ch > '9';) f = (ch == '-');
  for (; ch >= '0' && ch <= '9'; (ch = getchar())) x = x * 10 + ch - '0';
  return f ? -x : x;
}
int H, N, A[205][205], V[205];
int B[205][205], Dep[205];
int P1[205], P2[205], G[205];
int CNT;
void Get(int x) {
  V[x] = 1;
  if (*A[x]) return;
  printf("? %d\n", x);
  fflush(stdout);
  *A[x] = IN();
  for (int i = 1, lim = *A[x]; i <= lim; i++) A[x][i] = IN();
  if (*A[x] == 0) exit(0);
}
void Put(int x) {
  printf("! %d\n", x);
  fflush(stdout);
}
void DFS(int x, int d) {
  if (!d) {
    G[++*G] = x;
    return;
  }
  Get(x);
  for (int i = 1, lim = *A[x]; i <= lim; i++)
    if (!V[A[x][i]]) DFS(A[x][i], d - 1);
}
int Work() {
  int x = 1, dep = 0;
  Get(x);
  if (*A[x] == 2) return x;
  if (*A[x] == 1) {
    x = A[x][1], Get(x), dep = H - 1;
  } else {
    int y = A[x][1], z = A[x][2];
    *P1 = *P2 = 0;
    for (;;) {
      Get(y);
      P1[++*P1] = y;
      if (*A[y] == 2) return y;
      if (*A[y] == 1) break;
      for (int i = 1, lim = *A[y]; i <= lim; i++)
        if (!V[A[y][i]]) {
          y = A[y][i];
          break;
        }
    }
    for (;;) {
      Get(z);
      P2[++*P2] = z;
      if (*A[z] == 2) return z;
      if (*A[z] == 1) break;
      for (int i = 1, lim = *A[z]; i <= lim; i++)
        if (!V[A[z][i]]) {
          z = A[z][i];
          break;
        }
    }
    if (*P1 == *P2) {
      for (int i = 1, lim = *A[x]; i <= lim; i++)
        if (!V[A[x][i]]) {
          x = A[x][i];
          break;
        }
      dep = H - *P1 - 1;
      Get(x);
    } else {
      if (*P1 > *P2) {
        x = P1[(*P1 - *P2) / 2];
        dep = H - (*P2 + (*P1 - *P2) / 2);
      } else {
        x = P2[(*P2 - *P1) / 2];
        dep = H - (*P1 + (*P2 - *P1) / 2);
      }
      for (int i = 1, lim = *A[x]; i <= lim; i++)
        if (!V[A[x][i]]) {
          x = A[x][i];
          break;
        }
      dep--;
      Get(x);
    }
    if (*A[x] == 2) return x;
  }
  for (;;) {
    if (dep <= 3) {
      *G = 0;
      DFS(x, dep - 1);
      for (int i = 1, lim = (*G) - 1; i <= lim; i++) {
        Get(G[i]);
        if (*A[G[i]] == 2) return G[i];
      }
      return G[*G];
    }
    int y, z;
    for (int i = 1, lim = *A[x]; i <= lim; i++)
      if (!V[A[x][i]]) {
        y = z = A[x][i];
        break;
      }
    *G = 0;
    for (int k = 1, lim = H - dep - 1; k <= lim; k++) {
      Get(y);
      if (*A[y] == 2) return y;
      for (int i = 1, lim = *A[y]; i <= lim; i++)
        if (!V[A[y][i]]) {
          y = A[y][i];
          break;
        }
      G[++*G] = y;
    }
    Get(y);
    if (*A[y] == 2) return y;
    if (*A[y] == 1) {
      for (int i = 1, lim = *A[x]; i <= lim; i++)
        if (!V[A[x][i]]) {
          x = A[x][i];
          break;
        }
      dep--;
    } else {
      for (int i = 1, lim = *G; i <= lim; i++) V[G[i]] = 0;
      x = z;
      dep--;
    }
    Get(x);
    if (*A[x] == 2) return x;
  }
  assert(0);
  return 23;
}
void Pre(int u, int f, int d) {
  Dep[u] = d;
  for (int i = 1, lim = *B[u]; i <= lim; i++)
    if (B[u][i] != f) Pre(B[u][i], u, d + 1);
}
int main(int argc, char* argv[]) {
  for (int test = IN(); test--;) {
    H = IN();
    N = (1 << H) - 1;
    for (int i = 1, lim = N; i <= lim; i++) *A[i] = V[i] = 0;
    if (H == 0) exit(0);
    if (H <= 4) {
      for (int i = 1, lim = N; i <= lim; i++) {
        Get(i);
        if (*A[i] == 2) {
          Put(i);
          break;
        }
      }
    } else
      Put(Work());
  }
  return 0;
}
