#include <bits/stdc++.h>
const int MX = 8;
const long long MOD = 998244353;
int read() {
  char k = getchar();
  int x = 0;
  while (k < '0' || k > '9') k = getchar();
  while (k >= '0' && k <= '9') x = x * 10 + k - '0', k = getchar();
  return x;
}
using namespace std;
struct interactor {
  int MAX;
  int ch[1 << MX][2], p[1 << MX], antip[1 << MX];
  void init(int H) {
    MAX = 1 << H;
    for (int i = 1; i < (1 << (H - 1)); ++i)
      ch[i][0] = i << 1, ch[i][1] = (i << 1) | 1;
    for (int i = 1; i < (1 << H); ++i) p[i] = i;
    std::random_shuffle(p + 1, p + (1 << H));
    for (int i = 1; i < (1 << H); ++i) antip[p[i]] = i;
  }
  std::vector<int> ask(int x) {
    std::vector<int> t;
    x = antip[x];
    if ((x << 1) < MAX) t.push_back(p[x << 1]);
    if ((x << 1) + 1 < MAX) t.push_back(p[(x << 1) + 1]);
    if (x != 1) t.push_back(p[x >> 1]);
    return t;
  }
  void answer(int x) {
    if (antip[x] == 1) {
      printf("AC\n");
    } else
      printf("WA\n");
  }
} C;
vector<int> e[1 << MX];
int vis[1 << MX];
void ask(int x) {
  vis[x] = 1;
  printf("? %d\n", x);
  fflush(stdout);
  e[x] = C.ask(x);
  int t = read();
  if (t == 0) exit(0);
  e[x].clear();
  while (t--) e[x].push_back(read());
}
void answer(int x) {
  printf("! %d\n", x);
  fflush(stdout);
}
int findpath(int x, vector<int> &a) {
  ask(x);
  a.push_back(x);
  if (e[x].size() == 1) return 0;
  if (e[x].size() == 2) return x;
  for (auto i : e[x])
    if (!vis[i]) return findpath(i, a);
  assert(0);
}
void fuckoff(vector<int> &a, int cnt) {
  while (cnt--) a.pop_back();
}
int H, ans;
void solve() {
  H = read();
  C.init(H);
  memset(vis, 0, sizeof vis);
  for (int i = 1; i < (1 << H); ++i) e[i].clear();
  int top = 1;
  vector<int> p[2];
  ask(top);
  p[0].push_back(top);
  if (e[top].size() == 2) return answer(top);
  if (e[top].size() == 1)
    top = e[top][0];
  else {
    if ((ans = findpath(e[top][0], p[0])) || (ans = findpath(e[top][1], p[1])))
      return answer(ans);
    if (p[0].size() >= p[1].size()) std::swap(p[0], p[1]);
    reverse(p[0].begin(), p[0].end());
    p[0].insert(p[0].end(), p[1].begin(), p[1].end());
    int mid = p[0].size() / 2u;
    fuckoff(p[0], mid);
    top = p[0][mid];
    for (auto i : e[top])
      if (!vis[i]) top = i;
  }
  while (p[0].size() < 4) {
    p[0].push_back(top);
    ask(top);
    if (e[top].size() == 2) return answer(top);
    for (int j = 0; j < 3; ++j) {
      int to = e[top][j];
      if (!vis[to]) {
        p[1].clear();
        if ((ans = findpath(to, p[1]))) return answer(ans);
        p[0].insert(p[0].end(), p[1].begin(), p[1].end());
        int mid = p[0].size() / 2u;
        top = p[0][mid];
        fuckoff(p[0], mid);
        for (auto i : e[top])
          if (!vis[i]) top = i;
        break;
      }
    }
  }
  queue<int> q;
  q.push(top);
  int cnt = 7;
  while (1) {
    --cnt;
    int x = q.front();
    q.pop();
    if (cnt == 0) {
      return answer(x);
    }
    ask(x);
    if (e[x].size() == 2) return answer(x);
    for (auto i : e[x]) {
      if (!vis[i]) {
        q.push(i);
      }
    }
  }
}
int main() {
  srand(19260817);
  int T = read();
  for (int i = 1; i <= T; ++i) {
    solve();
  }
  return 0;
}
