#include <bits/stdc++.h>
using namespace std;
const long long PR = 1000000009;
set<int> nbr[500];
int cnt = 0, ht[500], fl = 0, h, qr[500];
void query(int a) {
  if (qr[a]) {
    cout << "NONONO" << '\n';
  }
  qr[a] = 1;
  cout << '?' << ' ' << a << '\n';
  fflush(stdout);
  int nb, br[3];
  cin >> nb;
  if (nb == 0) {
    exit(0);
  }
  nbr[a].clear();
  for (int i = 0; i < nb; ++i) {
    cin >> br[i];
    nbr[a].insert(br[i]);
  }
  if (nb == 1) {
    ht[a] = 1;
  }
  if (nb == 2) {
    fl = 1;
  }
}
void answer(int a) {
  cout << "! " << a << '\n';
  fflush(stdout);
}
void solve(int st) {
  int pres = *(nbr[st].begin()), prev = st;
  vector<int> path;
  ht[pres] = ht[st] + 1;
  if (ht[pres] == h) {
    answer(pres);
    fl = 0;
    return;
  }
  if (ht[pres] >= 5) {
    set<int> toquery;
    query(pres);
    if (fl) {
      answer(pres);
      fl = 0;
      return;
    }
    nbr[pres].erase(st);
    set<int>::iterator it = nbr[pres].begin();
    query(*it);
    if (fl) {
      answer(*it);
      fl = 0;
      return;
    }
    nbr[*it].erase(pres);
    for (set<int>::iterator it1 = nbr[*it].begin(); it1 != nbr[*it].end();
         it1++)
      toquery.insert(*it1);
    it++;
    query(*it);
    if (fl) {
      answer(*it);
      fl = 0;
      return;
    }
    nbr[*it].erase(pres);
    for (set<int>::iterator it1 = nbr[*it].begin(); it1 != nbr[*it].end();
         it1++)
      toquery.insert(*it1);
    while (toquery.size() > 1) {
      query(*(toquery.begin()));
      if (fl) {
        answer(*(toquery.begin()));
        fl = 0;
        return;
      }
      toquery.erase(*(toquery.begin()));
    }
    answer(*(toquery.begin()));
    return;
  }
  path.push_back(pres);
  while (1) {
    query(pres);
    ht[pres] = ht[prev] + 1;
    if (fl) {
      answer(pres);
      fl = 0;
      return;
    }
    nbr[pres].erase(prev);
    if (nbr[pres].empty()) break;
    int t = pres;
    pres = *(nbr[pres].begin());
    prev = t;
    nbr[t].erase(pres);
    path.push_back(pres);
  }
  int next = path.back();
  for (int i = path.size() - 1; i >= 0; i--) {
    ht[path[i]] = min(ht[path[i]], (int)(path.size() - i));
    if (ht[path[i]] > ht[next]) next = path[i];
  }
  solve(next);
}
void startup(int st) {
  vector<int> p1, p2;
  int pres = st, prev = -1;
  p1.push_back(st);
  while (1) {
    query(pres);
    if (fl) {
      answer(pres);
      fl = 0;
      return;
    }
    if (nbr[pres].size() == 1) break;
    nbr[pres].erase(prev);
    if (nbr[pres].empty()) break;
    int t = pres;
    pres = *(nbr[pres].begin());
    prev = t;
    nbr[t].erase(pres);
    p1.push_back(pres);
  }
  if (p1.size() == 1) {
    ht[st] = 1;
    solve(st);
    return;
  }
  pres = *(nbr[st].begin()), prev = st;
  nbr[st].erase(pres);
  p2.push_back(pres);
  while (1) {
    query(pres);
    if (fl) {
      answer(pres);
      fl = 0;
      return;
    }
    if (nbr[pres].size() == 1) break;
    nbr[pres].erase(prev);
    if (nbr[pres].empty()) break;
    int t = pres;
    pres = *(nbr[pres].begin());
    prev = t;
    nbr[t].erase(pres);
    p2.push_back(pres);
  }
  vector<int> total;
  for (int i = p1.size() - 1; i >= 0; i--) {
    total.push_back(p1[i]);
  }
  for (int i = 0; i < p2.size(); i++) {
    total.push_back(p2[i]);
  }
  ht[total[total.size() / 2]] = total.size() / 2 + 1;
  solve(total[total.size() / 2]);
}
int main() {
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    cin >> h;
    fl = 0;
    for (int i = 1; i < 500; i++) {
      nbr[i].clear();
      qr[i] = 0;
    }
    startup(1);
  }
  return 0;
};
