#include <bits/stdc++.h>
using namespace std;
int T, N, K;
vector<int> con[128];
vector<int> ask(int n) {
  if (((int)(con[n]).size())) return con[n];
  printf("? %d\n", n);
  fflush(stdout);
  int sz;
  scanf("%d", &sz);
  vector<int> ret(sz);
  for (int i = 0; i < sz; i++) scanf("%d", &ret[i]);
  return con[n] = ret;
}
void report(int n) {
  printf("! %d\n", n);
  fflush(stdout);
}
vector<int> get_candidate(int n, int from, int bound) {
  vector<int> ret = {n};
  if (!bound) return ret;
  for (int t : ask(n))
    if (t != from) {
      auto arr = get_candidate(t, n, bound - 1);
      for (int v : arr) ret.push_back(v);
    }
  return ret;
}
void work(int n, int from, int lvl) {
  if (lvl == K) {
    report(n);
    return;
  }
  if (K - lvl < 3) {
    auto arr = get_candidate(n, from, K - lvl);
    int last = arr.back();
    arr.pop_back();
    for (int nd : arr)
      if (((int)(ask(nd)).size()) == 2) {
        report(nd);
        return;
      }
    report(last);
    return;
  }
  vector<int> path(lvl - 2, 0);
  path.push_back(from);
  for (int nd = n, f = from; nd;) {
    path.push_back(nd);
    auto arr = ask(nd);
    if (((int)(arr).size()) == 2) {
      report(nd);
      return;
    }
    int nxt = 0;
    for (int t : arr)
      if (t != f) nxt = t;
    f = nd;
    nd = nxt;
  }
  int m = ((int)(path).size());
  int t = path[m / 2], a = path[m / 2 - 1], b = path[m / 2 + 1];
  int up = 0;
  for (int nd : ask(t))
    if (nd != a && nd != b) up = nd;
  work(up, t, m / 2 + 2);
}
void proc() {
  vector<int> path = {1};
  auto arr = ask(1);
  if (((int)(arr).size()) == 2) {
    report(1);
    return;
  }
  if (((int)(arr).size()) == 1) {
    work(arr[0], 1, 2);
    return;
  }
  for (int n = arr[0], from = 1; n;) {
    path.push_back(n);
    auto arr = ask(n);
    if (((int)(arr).size()) == 2) {
      report(n);
      return;
    }
    int nxt = 0;
    for (int t : arr)
      if (t != from) nxt = t;
    from = n;
    n = nxt;
  }
  reverse((path).begin(), (path).end());
  for (int n = arr[1], from = 1; n;) {
    path.push_back(n);
    auto arr = ask(n);
    if (((int)(arr).size()) == 2) {
      report(n);
      return;
    }
    int nxt = 0;
    for (int t : arr)
      if (t != from) nxt = t;
    from = n;
    n = nxt;
  }
  int m = ((int)(path).size());
  int t = path[m / 2], a = path[m / 2 - 1], b = path[m / 2 + 1];
  int up = 0;
  for (int nd : ask(t))
    if (nd != a && nd != b) up = nd;
  work(up, t, m / 2 + 2);
}
int main() {
  for (scanf("%d", &T); T--;) {
    scanf("%d", &K);
    N = (1 << K) - 1;
    for (int i = 1; i <= N; i++) con[i].clear();
    proc();
  }
}
