#include <bits/stdc++.h>
using namespace std;
map<int, vector<int> > cache;
int Total;
vector<int> ask(int c) {
  vector<int> res;
  cout << "? " << c + 1 << endl;
  cout.flush();
  int K;
  cin >> K;
  if (K == 0) exit(0);
  res = vector<int>(K);
  for (int i = 0; i < (K); ++i) {
    cin >> res[i];
    res[i]--;
  }
  cache[c] = res;
  Total++;
  return res;
}
void print_ans(int y) {
  cout << "! " << y + 1 << endl;
  cout.flush();
}
bool findChain(int s, vector<int>& vis, vector<int>& chain) {
  chain.push_back(s);
  vis[s] = 1;
  while (1) {
    vector<int> ans = ask(s);
    if (ans.size() == 2) {
      print_ans(s);
      return false;
    }
    if (ans.size() == 1) {
      return true;
    }
    for (int i = 0; i < (ans.size()); ++i) {
      if (vis[ans[i]]) continue;
      return findChain(ans[i], vis, chain);
    }
    return false;
  }
}
void bfs(int s, vector<int>& vis) {
  queue<int> q;
  q.push(s);
  vis[s] = 1;
  while (!q.empty()) {
    int curr = q.front();
    q.pop();
    if (Total == 16) {
      print_ans(curr);
      return;
    }
    vector<int> next = ask(curr);
    if (next.size() == 2) {
      print_ans(curr);
      return;
    }
    for (int c : next) {
      if (!vis[c]) {
        q.push(c);
        vis[c] = 1;
      }
    }
  }
}
int findNonChecked(int s, const vector<int>& vis) {
  if (vis[s] == 0) {
    cout << "ASSERT" << endl;
    return -1;
  }
  for (int t : cache[s]) {
    if (vis[t] == 0) return t;
  }
  cout << "ASSERT" << endl;
  return -1;
}
void solve(int H) {
  int mt = (1 << H) - 1;
  vector<int> vis(mt);
  vector<int> r1 = ask(0);
  if (r1.size() == 2) {
    print_ans(0);
    return;
  }
  vis[0] = 1;
  vector<int> firstChain;
  if (r1.size() == 1) {
    vector<int> chain;
    if (!findChain(r1[0], vis, chain)) return;
    firstChain.push_back(0);
    for (int c : chain) firstChain.push_back(c);
  } else {
    vector<int> chain1, chain2;
    if (!findChain(r1[0], vis, chain1)) return;
    if (!findChain(r1[1], vis, chain2)) return;
    for (int i = chain1.size() - 1; i >= 0; --i)
      firstChain.push_back(chain1[i]);
    firstChain.push_back(0);
    for (int i = 0; i < chain2.size(); ++i) firstChain.push_back(chain2[i]);
  }
  int topElement = firstChain[firstChain.size() / 2];
  int level = H - firstChain.size() / 2 - 1;
  while (level > 3) {
    vector<int> nextChain;
    int s = findNonChecked(topElement, vis);
    if (!findChain(s, vis, nextChain)) return;
    int fromBottom = H - level - 1;
    int total = fromBottom + nextChain.size();
    int delta = total / 2 - fromBottom;
    topElement = nextChain[delta - 1];
    level -= delta;
  }
  int s = findNonChecked(topElement, vis);
  bfs(s, vis);
}
int main() {
  int T;
  cin >> T;
  for (int t = 0; t < (T); ++t) {
    int h;
    cin >> h;
    if (h == 0) exit(0);
    cache.clear();
    Total = 0;
    solve(h);
  }
  return 0;
}
