#include <bits/stdc++.h>
using namespace std;
vector<int> adj[666666];
int n, h, ans = 0;
void upd(int x) {
  if (adj[x].size() || ans) return;
  printf("? %d\n", x);
  fflush(stdout);
  int k;
  scanf("%d", &k);
  if (k == 2) ans = x;
  adj[x].resize(k);
  for (int i = 0; i < k; i++) scanf("%d", &adj[x][i]);
}
void prt(int x = ans) {
  printf("! %d\n", x);
  fflush(stdout);
}
int dis[666666], dir[666666], fa[666666];
bool leaf[666666];
int qs[666666];
int fa_1() {
  upd(1);
  if (adj[1].size() == 2) return 0;
  if (adj[1].size() == 1) return adj[1][0];
  int l = 1, r = 1, tot = 0;
  qs[r++] = 1;
  while (l ^ r) {
    int x = qs[l++];
    if (leaf[dir[x]]) continue;
    upd(x);
    for (int b : adj[x]) {
      if (b == fa[x]) continue;
      fa[b] = x;
      dis[b] = dis[x] + 1;
      if (x == 1)
        dir[b] = b;
      else
        dir[b] = dir[x];
      if (!leaf[dir[b]]) {
        upd(b);
        if (ans) return 233;
        if (adj[b].size() == 1) leaf[dir[b]] = 1, ++tot;
        if (dis[b] < 3) qs[r++] = b;
      }
    }
    if (tot == 2) break;
  }
  for (int a : adj[1]) {
    if (!leaf[a]) return a;
  }
  return 0;
}
bool chk(int x, int f, int z) {
  upd(x);
  if (adj[x].size() == 1) return 0;
  if (!z) return 1;
  for (int b : adj[x]) {
    if (b != f) return chk(b, x, z - 1);
  }
}
int ss[666666], sn = 0;
void push(int x, int f, int dep) {
  if (!dep) {
    ss[++sn] = x;
    return;
  }
  upd(x);
  for (auto b : adj[x])
    if (b != f) push(b, x, dep - 1);
}
void sol() {
  scanf("%d", &h);
  n = (1 << h);
  ans = 0;
  for (int i = 1; i <= n; i++) adj[i].clear();
  memset(dis, 0, sizeof(dis));
  memset(fa, 0, sizeof(fa));
  memset(leaf, 0, sizeof(leaf));
  memset(dir, 0, sizeof(dir));
  int fa1 = fa_1();
  if (ans) {
    prt();
    return;
  }
  int dep = 0;
  for (int i = 1; i <= n; i++)
    if (leaf[dir[i]]) dep = max(dep, dis[i]);
  dep = h - dep;
  int cur = 1, bk = 1;
  if (dep > 3) {
    cur = fa1;
    while (--dep > 3) {
      upd(cur);
      vector<int> tmp = adj[cur];
      tmp.erase(find(tmp.begin(), tmp.end(), bk));
      int fa = tmp[0];
      if (!chk(fa, cur, h - dep - 1)) fa = tmp[1];
      bk = cur;
      cur = fa;
    }
  }
  sn = 0;
  push(cur, bk, 2);
  for (int i = 1; i < sn; i++) upd(ss[i]);
  if (!ans) ans = ss[sn];
  prt();
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) sol();
}
