This is an interactive problem. In the interaction section below you will find the information about flushing the output.The New Year tree of height h is a perfect binary tree with vertices numbered 1 through 2h - 1 in some order. In this problem we assume that h is at least 2. The drawing below shows one example New Year tree of height 3:  Polar bears love decorating the New Year tree and Limak is no exception. To decorate the tree, he must first find its root, i.e. a vertex with exactly two neighbours (assuming that h ≥ 2). It won't be easy because Limak is a little bear and he doesn't even see the whole tree. Can you help him?There are t testcases. In each testcase, you should first read h from the input. Then you can ask at most 16 questions of format "? x" (without quotes), where x is an integer between 1 and 2h - 1, inclusive. As a reply you will get the list of neighbours of vertex x (more details in the "Interaction" section below). For example, for a tree on the drawing above after asking "? 1" you would get a response with 3 neighbours: 4, 5 and 7. Your goal is to find the index of the root y and print it in the format "! y". You will be able to read h for a next testcase only after printing the answer in a previous testcase and flushing the output.Each tree is fixed from the beginning and it doesn't change during your questions.

The first line of the input contains a single integer t (1 ≤ t ≤ 500) — the number of testcases. At the beginning of each testcase you should read from the input a single integer h (2 ≤ h ≤ 7) — the height of the tree. You can't read the value of h in a next testcase until you answer a previous testcase.

NoteIn the first sample, a tree corresponds to the drawing from the statement.In the second sample, there are two two testcases. A tree in the first testcase has height 2 and thus 3 vertices. A tree in the second testcase has height 4 and thus 15 vertices. You can see both trees on the drawing below.

type rec=record
    a,b,c:longint;
end;
var i,j,m,n,test,x,tot,a,b,c,h,ii,aa,tot1,tot2,bb,cc:longint;
    visit:array[0..200]of boolean;
    road,road1,road2:array[0..20]of longint;
    solved:boolean;
    ans:array[0..200]of rec;
procedure dfs3(u:longint);
var x,a,b,c,temp:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    writeln('? ',u);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end;
    if x=1 then begin
        readln(a);
        exit;
    end;
    readln(a,b,c);
    ans[u].a:=a;
    ans[u].b:=b;
    ans[u].c:=c;
    if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
    dfs3(temp);
end;
procedure dfs4(u,dep:longint);
var x,a,b,c:longint;
begin
    if dep>2 then exit;
    //if visit[u]=false tehn
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;

    writeln('? ',u);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        flush(output);
        solved:=true;
        exit;
    end else if x=1 then begin
        readln(a);
        exit;
    end else begin
        readln(a,b,c);
        ans[u].a:=a;
        ans[u].b:=b;
        ans[u].c:=c;
        {if visit[a]=false then begin
            dfs4(a,dep+1);
        end else if visit[b]=false then begin
            dfs4(b,dep+1);
        end else begin
            dfs4(c,dep+1);
        end;     }
        if visit[a]=false then begin
            dfs4(a,dep+1);
            if solved then exit;
        end;
        if visit[b]=false then begin
            dfs4(b,dep+1);
            if solved then exit;
        end;
        if visit[c]=false then begin
            dfs4(c,dep+1);
            if solved then exit;
        end;
    end;
end;
procedure dfs2(u:longint);
var x,a,b,c:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    writeln('? ',u);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end else if x=1 then begin
        readln(a);
        exit;
    end else begin
        readln(a,b,c);
        ans[u].a:=a;
        ans[u].b:=b;
        ans[u].c:=c;
        if visit[a]=false then begin
            dfs2(a);
        end else if visit[b]=false then begin
            dfs2(b);
        end else begin
            dfs2(c);
        end;
    end;
end;
procedure dfs(now,dep:longint);
var x,temp,aa,a,b,c,bb,cc,temp2:longint;
begin
    visit[now]:=true;
    writeln('? ',now);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',now);
        flush(output);
        solved:=true;
        exit;
    end;
    readln(a,b,c);
    if (dep=3) and (h=7) then begin
       tot:=0;
       if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
       dfs4(temp,1);
       if solved then exit;
       if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
       //dfs4(temp,1);
       writeln('? ',temp);
       flush(output);
       readln(x);
       if x=2 then begin
           readln(a,b);
           writeln('! ',temp);
           flush(output);
           solved:=true;

       end else begin
           readln(a,b,c);
           if visit[a]=false then temp2:=a else if visit[b]=false then temp2:=b else temp2:=c;
           visit[temp2]:=true;
           writeln('? ',temp2);
           flush(output);
           readln(x);
           if x=2 then begin
              readln(a,b);
              writeln('! ',temp2);
              flush(output);
              solved:=true;
              exit;
           end else begin
               if visit[a]=false then temp2:=a else if visit[b]=false then temp2:=b else temp2:=c;
               readln(aa,bb,cc);
               writeln('! ',temp2);
               flush(output);
               solved:=true;
               exit;
           end;
       end;
       exit;
    end;
    if (dep=2) and (h=7) then begin
        if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
        writeln('? ',temp);
        visit[temp]:=true;
        readln(x);
        if x=2 then begin
            readln(a,b);
            writeln('! ',temp);
            flush(output);
            solved:=true;
            exit;
        end;
        if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
        readln(a,b,c);
        writeln('! ',temp);
        flush(output);
        solved:=true;
        exit;
    end;
    if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
    if visit[temp]=false then begin
        tot:=0;
        dfs2(temp);
        if solved then exit;
        if tot=h-dep then begin
            if visit[a]=false then dfs(a,dep-1) else if visit[b]=false then dfs(b,dep-1) else dfs(c,dep-1);
        end else begin
            cc:=(tot-h+dep)>>1;
            aa:=road[(tot-h+dep)>>1];
            //dfs(road[aa],dep-aa);
            if visit[ans[aa].a]=false then bb:=ans[aa].a else if visit[ans[aa].b]=false then bb:=ans[aa].b else bb:=ans[aa].c;
            dfs(bb,dep-cc-1);
        end;
    end;

end;
begin
    readln(test);
    for ii:=1 to test do begin
        //ans:=0;
        solved:=false;
        dec(test);
        readln(h);
        fillchar(visit,sizeof(visit),false);
        writeln('? ',1);
        visit[1]:=true;
        flush(output);
        read(x);
        if x=2 then begin
           readln(a,b);
           writeln('! ',1);
           flush(output);
           continue;
        end else if x=1 then begin
            readln(a);
            dfs(a,h-1);
        end else begin
            readln(a,b,c);
            tot:=0;
            dfs3(a);
            if solved then continue;
            tot1:=tot;
            for i:=1 to tot do road1[i]:=road[i];
            tot:=0;
            dfs3(b);
            if solved then continue;
            tot2:=tot;
            for i:=1 to tot do road2[i]:=road[i];
            if tot1=tot2 then begin
                dfs(c,h-tot1-1);
            end else begin
               if tot1<tot2 then begin
                   aa:=road2[(tot2-tot1)>>1];

                   //dfs(road2[aa],h-(tot1+tot2)>>1);
               end else begin
                   aa:=road1[(tot1-tot2)>>1];
                   //dfs(road1[aa],h-(tot1+tot2)>>1);
               end;
               if visit[ans[aa].a]=false then bb:=ans[aa].a else if visit[ans[aa].b]=false then bb:=ans[aa].b else bb:=ans[aa].c;
               dfs(bb,h-(tot1+tot2)>>1-1);
            end;
        end;
    end;
end.

type rec=record
    a,b,c:longint;
end;
var i,j,m,n,test,x,tot,a,b,c,h,ii,aa,tot1,tot2,bb,cc:longint;
    visit:array[0..200]of boolean;
    road,road1,road2:array[0..20]of longint;
    solved:boolean;
    ans:array[0..200]of rec;
procedure dfs3(u:longint);
var x,a,b,c,temp:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    writeln('? ',u);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end;
    if x=1 then begin
        readln(a);
        exit;
    end;
    readln(a,b,c);
    ans[u].a:=a;
    ans[u].b:=b;
    ans[u].c:=c;
    if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
    dfs3(temp);
end;
procedure dfs4(u,dep:longint);
var x,a,b,c:longint;
begin
    if dep>2 then exit;
    //if visit[u]=false tehn
    visit[u]:=true;
    writeln('? ',u);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        flush(output);
        solved:=true;
        exit;
    end else if x=1 then begin
        readln(a);
        exit;
    end else begin
        readln(a,b,c);
        if visit[a]=false then begin
            dfs4(a,dep+1);
            if solved then exit;
        end;
        if visit[b]=false then begin
            dfs4(b,dep+1);
            if solved then exit;
        end;
        if visit[c]=false then begin
            dfs4(c,dep+1);
            if solved then exit;
        end;
    end;
end;
procedure dfs2(u:longint);
var x,a,b,c:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    writeln('? ',u);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end else if x=1 then begin
        readln(a);
        exit;
    end else begin
        readln(a,b,c);
        ans[u].a:=a;
        ans[u].b:=b;
        ans[u].c:=c;
        if visit[a]=false then begin
            dfs2(a);
        end else if visit[b]=false then begin
            dfs2(b);
        end else begin
            dfs2(c);
        end;
    end;
end;
procedure dfs(now,dep:longint);
var x,temp,aa,a,b,c,bb,cc,temp2:longint;
begin
    visit[now]:=true;
    writeln('? ',now);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',now);
        flush(output);
        solved:=true;
        exit;
    end;
    readln(a,b,c);
    if (dep=3) and (h=7) then begin
       tot:=0;
       if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
       dfs4(temp,1);
       if solved then exit;
       if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
       //dfs4(temp,1);
       writeln('? ',temp);
       flush(output);
       readln(x);
       if x=2 then begin
           readln(a,b);
           writeln('! ',temp);
           flush(output);
           solved:=true;
       end else begin
           readln(a,b,c);
           if visit[a]=false then temp2:=a else if visit[b]=false then temp2:=b else temp2:=c;
           visit[temp2]:=true;
           writeln('? ',temp2);
           flush(output);
           readln(x);
           if x=2 then begin
              readln(a,b);
              writeln('! ',temp2);
              flush(output);
              solved:=true;
              exit;
           end else begin
               if visit[a]=false then temp2:=a else if visit[b]=false then temp2:=b else temp2:=c;
               readln(aa,bb,cc);
               writeln('! ',temp2);
               flush(output);
               solved:=true;
               exit;
           end;
       end;
       exit;
    end;
    if (dep=2) and (h=7) then begin
        if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
        writeln('? ',temp);
        visit[temp]:=true;
        readln(x);
        if x=2 then begin
            readln(a,b);
            writeln('! ',temp);
            flush(output);
            solved:=true;
            exit;
        end;
        if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
        readln(a,b,c);
        writeln('! ',temp);
        flush(output);
        solved:=true;
        exit;
    end;
    if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
    if visit[temp]=false then begin
        tot:=0;
        dfs2(temp);
        if solved then exit;
        if tot=h-dep then begin
            if visit[a]=false then dfs(a,dep-1) else if visit[b]=false then dfs(b,dep-1) else dfs(c,dep-1);
        end else begin
            cc:=(tot-h+dep)>>1;
            aa:=road[(tot-h+dep)>>1];
            //dfs(road[aa],dep-aa);
            if visit[ans[aa].a]=false then bb:=ans[aa].a else if visit[ans[aa].b]=false then bb:=ans[aa].b else bb:=ans[aa].c;
            dfs(bb,dep-cc-1);
        end;
    end;

end;
begin
    readln(test);
    for ii:=1 to test do begin
        //ans:=0;
        solved:=false;
        dec(test);
        readln(h);
        fillchar(visit,sizeof(visit),false);
        writeln('? ',1);
        visit[1]:=true;
        flush(output);
        read(x);
        if x=2 then begin
           readln(a,b);
           writeln('! ',1);
           flush(output);
           continue;
        end else if x=1 then begin
            readln(a);
            dfs(a,h-1);
        end else begin
            readln(a,b,c);
            tot:=0;
            dfs3(a);
            if solved then continue;
            tot1:=tot;
            for i:=1 to tot do road1[i]:=road[i];
            tot:=0;
            dfs3(b);
            if solved then continue;
            tot2:=tot;
            for i:=1 to tot do road2[i]:=road[i];
            if tot1=tot2 then begin
                dfs(c,h-tot1-1);
            end else begin
               if tot1<tot2 then begin
                   aa:=road2[(tot2-tot1)>>1];

                   //dfs(road2[aa],h-(tot1+tot2)>>1);
               end else begin
                   aa:=road1[(tot1-tot2)>>1];
                   //dfs(road1[aa],h-(tot1+tot2)>>1);
               end;
               if visit[ans[aa].a]=false then bb:=ans[aa].a else if visit[ans[aa].b]=false then bb:=ans[aa].b else bb:=ans[aa].c;
               dfs(bb,h-(tot1+tot2)>>1-1);
            end;
        end;
    end;
end.

type rec=record
    a,b,c:longint;
end;
var i,j,m,n,test,x,tot,a,b,c,h,ii,aa,tot1,tot2,bb,cc:longint;
    visit:array[0..200]of boolean;
    road,road1,road2:array[0..20]of longint;
    solved:boolean;
    ans:array[0..200]of rec;
procedure dfs3(u:longint);
var x,a,b,c,temp:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    writeln('? ',u);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end;
    if x=1 then begin
        readln(a);
        exit;
    end;
    readln(a,b,c);
    ans[u].a:=a;
    ans[u].b:=b;
    ans[u].c:=c;
    if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
    dfs3(temp);
end;
procedure dfs4(u,dep:longint);
var x,a,b,c:longint;
begin
    if dep>2 then exit;
    //if visit[u]=false tehn
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;

    writeln('? ',u);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        flush(output);
        solved:=true;
        exit;
    end else if x=1 then begin
        readln(a);
        exit;
    end else begin
        readln(a,b,c);
        ans[u].a:=a;
        ans[u].b:=b;
        ans[u].c:=c;
        if visit[a]=false then begin
            dfs4(a,dep+1);
        end else if visit[b]=false then begin
            dfs4(b,dep+1);
        end else begin
            dfs4(c,dep+1);
        end;
    end;
end;
procedure dfs2(u:longint);
var x,a,b,c:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    writeln('? ',u);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end else if x=1 then begin
        readln(a);
        exit;
    end else begin
        readln(a,b,c);
        ans[u].a:=a;
        ans[u].b:=b;
        ans[u].c:=c;
        if visit[a]=false then begin
            dfs2(a);
        end else if visit[b]=false then begin
            dfs2(b);
        end else begin
            dfs2(c);
        end;
    end;
end;
procedure dfs(now,dep:longint);
var x,temp,aa,a,b,c,bb,cc,temp2:longint;
begin
    visit[now]:=true;
    writeln('? ',now);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',now);
        flush(output);
        solved:=true;
        exit;
    end;
    readln(a,b,c);
    if (dep=3) and (h=7) then begin
       tot:=0;
       if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
       dfs4(temp,1);
       if solved then exit;
       if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
       //dfs4(temp,1);
       writeln('? ',temp);
       flush(output);
       readln(x);
       if x=2 then begin
           readln(a,b);
           writeln('! ',temp);
           flush(output);
           solved:=true;

       end else begin
           readln(a,b,c);
           if visit[a]=false then temp2:=a else if visit[b]=false then temp2:=b else temp2:=c;
           visit[temp2]:=true;
           writeln('? ',temp2);
           flush(output);
           readln(x);
           if x=2 then begin
              readln(a,b);
              writeln('! ',temp2);
              flush(output);
              solved:=true;
              exit;
           end else begin
               if visit[a]=false then temp2:=a else if visit[b]=false then temp2:=b else temp2:=c;
               readln(aa,bb,cc);
               writeln('! ',temp2);
               flush(output);
               solved:=true;
               exit;
           end;
       end;
       exit;
    end;
    if (dep=2) and (h=7) then begin
        if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
        writeln('? ',temp);
        visit[temp]:=true;
        readln(x);
        if x=2 then begin
            readln(a,b);
            writeln('! ',temp);
            flush(output);
            solved:=true;
            exit;
        end;
        if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
        readln(a,b,c);
        writeln('! ',temp);
        flush(output);
        solved:=true;
        exit;
    end;
    if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
    if visit[temp]=false then begin
        tot:=0;
        dfs2(temp);
        if solved then exit;
        if tot=h-dep then begin
            if visit[a]=false then dfs(a,dep-1) else if visit[b]=false then dfs(b,dep-1) else dfs(c,dep-1);
        end else begin
            cc:=(tot-h+dep)>>1;
            aa:=road[(tot-h+dep)>>1];
            //dfs(road[aa],dep-aa);
            if visit[ans[aa].a]=false then bb:=ans[aa].a else if visit[ans[aa].b]=false then bb:=ans[aa].b else bb:=ans[aa].c;
            dfs(bb,dep-cc-1);
        end;
    end;

end;
begin
    readln(test);
    for ii:=1 to test do begin
        //ans:=0;
        solved:=false;
        dec(test);
        readln(h);
        fillchar(visit,sizeof(visit),false);
        writeln('? ',1);
        visit[1]:=true;
        flush(output);
        read(x);
        if x=2 then begin
           readln(a,b);
           writeln('! ',1);
           flush(output);
           continue;
        end else if x=1 then begin
            readln(a);
            dfs(a,h-1);
        end else begin
            readln(a,b,c);
            tot:=0;
            dfs3(a);
            if solved then continue;
            tot1:=tot;
            for i:=1 to tot do road1[i]:=road[i];
            tot:=0;
            dfs3(b);
            if solved then continue;
            tot2:=tot;
            for i:=1 to tot do road2[i]:=road[i];
            if tot1=tot2 then begin
                dfs(c,h-tot1-1);
            end else begin
               if tot1<tot2 then begin
                   aa:=road2[(tot2-tot1)>>1];

                   //dfs(road2[aa],h-(tot1+tot2)>>1);
               end else begin
                   aa:=road1[(tot1-tot2)>>1];
                   //dfs(road1[aa],h-(tot1+tot2)>>1);
               end;
               if visit[ans[aa].a]=false then bb:=ans[aa].a else if visit[ans[aa].b]=false then bb:=ans[aa].b else bb:=ans[aa].c;
               dfs(bb,h-(tot1+tot2)>>1-1);
            end;
        end;
    end;
end.

type rec=record
    a,b,c:longint;
end;
var i,j,m,n,test,x,tot,a,b,c,h,ii,aa,tot1,tot2,bb,cc:longint;
    visit:array[0..200]of boolean;
    road,road1,road2:array[0..20]of longint;
    solved:boolean;
    ans:array[0..200]of rec;
procedure dfs3(u:longint);
var x,a,b,c,temp:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    writeln('? ',u);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end;
    if x=1 then begin
        readln(a);
        exit;
    end;
    readln(a,b,c);
    ans[u].a:=a;
    ans[u].b:=b;
    ans[u].c:=c;
    if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
    dfs3(temp);
end;
procedure dfs4(u,dep:longint);
var x:longint;
begin
    if dep>2 then exit;
    //if visit[u]=false tehn
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;

    writeln('? ',u);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        flush(output);
        solved:=true;
        exit;
    end else if x=1 then begin
        readln(a);
        exit;
    end else begin
        readln(a,b,c);
        ans[u].a:=a;
        ans[u].b:=b;
        ans[u].c:=c;
        if visit[a]=false then begin
            dfs4(a,dep+1);
        end else if visit[b]=false then begin
            dfs4(b,dep+1);
        end else begin
            dfs4(c,dep+1);
        end;
    end;
end;
procedure dfs2(u:longint);
var x:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    writeln('? ',u);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end else if x=1 then begin
        readln(a);
        exit;
    end else begin
        readln(a,b,c);
        ans[u].a:=a;
        ans[u].b:=b;
        ans[u].c:=c;
        if visit[a]=false then begin
            dfs2(a);
        end else if visit[b]=false then begin
            dfs2(b);
        end else begin
            dfs2(c);
        end;
    end;
end;
procedure dfs(now,dep:longint);
var x,temp,aa,a,b,c,bb,cc,temp2:longint;
begin
    visit[now]:=true;
    writeln('? ',now);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',now);
        solved:=true;
        exit;
    end;
    readln(a,b,c);
    if (dep=3) and (h=7) then begin
       tot:=0;
       if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
       dfs4(temp,1);
       if solved then exit;
       if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
       //dfs4(temp,1);
       writeln('? ',temp);
       flush(output);
       readln(x);
       if x=2 then begin
           readln(a,b);
           writeln('! ',temp);
           flush(output);
           solved:=true;

       end else begin
           readln(a,b,c);
           if visit[a]=false then temp2:=a else if visit[b]=false then temp2:=b else temp2:=c;
           visit[temp2]:=true;
           writeln('? ',temp2);
           flush(output);
           readln(x);
           if x=2 then begin
              readln(a,b);
              writeln('! ',temp2);
              flush(output);
              solved:=true;
              exit;
           end else begin
               if visit[a]=false then temp2:=a else if visit[b]=false then temp2:=b else temp2:=c;
               readln(aa,bb,cc);
               writeln('! ',temp2);
               flush(output);
               solved:=true;
               exit;
           end;
       end;
       exit;
    end;
    if (dep=2) and (h=7) then begin
        if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
        writeln('? ',temp);
        visit[temp]:=true;
        readln(x);
        if x=2 then begin
            readln(a,b);
            writeln('! ',temp);
            flush(output);
            solved:=true;
            exit;
        end;
        if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
        readln(a,b,c);
        writeln('! ',temp);
        flush(output);
        solved:=true;
        exit;
    end;
    if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
    if visit[temp]=false then begin
        tot:=0;
        dfs2(temp);
        if solved then exit;
        if tot=h-dep then begin
            if visit[a]=false then dfs(a,dep-1) else if visit[b]=false then dfs(b,dep-1) else dfs(c,dep-1);
        end else begin
            cc:=(tot-h+dep)>>1;
            aa:=road[(tot-h+dep)>>1];
            //dfs(road[aa],dep-aa);
            if visit[ans[aa].a]=false then bb:=ans[aa].a else if visit[ans[aa].b]=false then bb:=ans[aa].b else bb:=ans[aa].c;
            dfs(bb,dep-cc-1);
        end;
    end;

end;
begin
    readln(test);
    for ii:=1 to test do begin
        //ans:=0;
        solved:=false;
        dec(test);
        readln(h);
        fillchar(visit,sizeof(visit),false);
        writeln('? ',1);
        visit[1]:=true;
        flush(output);
        read(x);
        if x=2 then begin
           readln(a,b);
           writeln('! ',1);
           flush(output);
           continue;
        end else if x=1 then begin
            readln(a);
            dfs(a,h-1);
        end else begin
            readln(a,b,c);
            tot:=0;
            dfs3(a);
            if solved then continue;
            tot1:=tot;
            for i:=1 to tot do road1[i]:=road[i];
            tot:=0;
            dfs3(b);
            if solved then continue;
            tot2:=tot;
            for i:=1 to tot do road2[i]:=road[i];
            if tot1=tot2 then begin
                dfs(c,h-tot1-1);
            end else begin
               if tot1<tot2 then begin
                   aa:=road2[(tot2-tot1)>>1];

                   //dfs(road2[aa],h-(tot1+tot2)>>1);
               end else begin
                   aa:=road1[(tot1-tot2)>>1];
                   //dfs(road1[aa],h-(tot1+tot2)>>1);
               end;
               if visit[ans[aa].a]=false then bb:=ans[aa].a else if visit[ans[aa].b]=false then bb:=ans[aa].b else bb:=ans[aa].c;
               dfs(bb,h-(tot1+tot2)>>1-1);
            end;
        end;
    end;
end.

type rec=record
    a,b,c:longint;
end;
var i,j,m,n,test,x,tot,a,b,c,h,ii,aa,tot1,tot2,bb,cc:longint;
    visit:array[0..200]of boolean;
    road,road1,road2:array[0..20]of longint;
    solved:boolean;
    ans:array[0..200]of rec;
procedure dfs3(u:longint);
var x,a,b,c,temp:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    writeln('? ',u);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end;
    if x=1 then begin
        readln(a);
        exit;
    end;
    readln(a,b,c);
    ans[u].a:=a;
    ans[u].b:=b;
    ans[u].c:=c;
    if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
    dfs3(temp);
end;
procedure dfs4(u,dep:longint);
var x,a,b,c:longint;
begin
    if dep>2 then exit;
    //if visit[u]=false tehn
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;

    writeln('? ',u);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        flush(output);
        solved:=true;
        exit;
    end else if x=1 then begin
        readln(a);
        exit;
    end else begin
        readln(a,b,c);
        ans[u].a:=a;
        ans[u].b:=b;
        ans[u].c:=c;
        if visit[a]=false then begin
            dfs4(a,dep+1);
        end else if visit[b]=false then begin
            dfs4(b,dep+1);
        end else begin
            dfs4(c,dep+1);
        end;
    end;
end;
procedure dfs2(u:longint);
var x:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    writeln('? ',u);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end else if x=1 then begin
        readln(a);
        exit;
    end else begin
        readln(a,b,c);
        ans[u].a:=a;
        ans[u].b:=b;
        ans[u].c:=c;
        if visit[a]=false then begin
            dfs2(a);
        end else if visit[b]=false then begin
            dfs2(b);
        end else begin
            dfs2(c);
        end;
    end;
end;
procedure dfs(now,dep:longint);
var x,temp,aa,a,b,c,bb,cc,temp2:longint;
begin
    visit[now]:=true;
    writeln('? ',now);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',now);
        flush(output);
        solved:=true;
        exit;
    end;
    readln(a,b,c);
    if (dep=3) and (h=7) then begin
       tot:=0;
       if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
       dfs4(temp,1);
       if solved then exit;
       if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
       //dfs4(temp,1);
       writeln('? ',temp);
       flush(output);
       readln(x);
       if x=2 then begin
           readln(a,b);
           writeln('! ',temp);
           flush(output);
           solved:=true;

       end else begin
           readln(a,b,c);
           if visit[a]=false then temp2:=a else if visit[b]=false then temp2:=b else temp2:=c;
           visit[temp2]:=true;
           writeln('? ',temp2);
           flush(output);
           readln(x);
           if x=2 then begin
              readln(a,b);
              writeln('! ',temp2);
              flush(output);
              solved:=true;
              exit;
           end else begin
               if visit[a]=false then temp2:=a else if visit[b]=false then temp2:=b else temp2:=c;
               readln(aa,bb,cc);
               writeln('! ',temp2);
               flush(output);
               solved:=true;
               exit;
           end;
       end;
       exit;
    end;
    if (dep=2) and (h=7) then begin
        if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
        writeln('? ',temp);
        visit[temp]:=true;
        readln(x);
        if x=2 then begin
            readln(a,b);
            writeln('! ',temp);
            flush(output);
            solved:=true;
            exit;
        end;
        if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
        readln(a,b,c);
        writeln('! ',temp);
        flush(output);
        solved:=true;
        exit;
    end;
    if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
    if visit[temp]=false then begin
        tot:=0;
        dfs2(temp);
        if solved then exit;
        if tot=h-dep then begin
            if visit[a]=false then dfs(a,dep-1) else if visit[b]=false then dfs(b,dep-1) else dfs(c,dep-1);
        end else begin
            cc:=(tot-h+dep)>>1;
            aa:=road[(tot-h+dep)>>1];
            //dfs(road[aa],dep-aa);
            if visit[ans[aa].a]=false then bb:=ans[aa].a else if visit[ans[aa].b]=false then bb:=ans[aa].b else bb:=ans[aa].c;
            dfs(bb,dep-cc-1);
        end;
    end;

end;
begin
    readln(test);
    for ii:=1 to test do begin
        //ans:=0;
        solved:=false;
        dec(test);
        readln(h);
        fillchar(visit,sizeof(visit),false);
        writeln('? ',1);
        visit[1]:=true;
        flush(output);
        read(x);
        if x=2 then begin
           readln(a,b);
           writeln('! ',1);
           flush(output);
           continue;
        end else if x=1 then begin
            readln(a);
            dfs(a,h-1);
        end else begin
            readln(a,b,c);
            tot:=0;
            dfs3(a);
            if solved then continue;
            tot1:=tot;
            for i:=1 to tot do road1[i]:=road[i];
            tot:=0;
            dfs3(b);
            if solved then continue;
            tot2:=tot;
            for i:=1 to tot do road2[i]:=road[i];
            if tot1=tot2 then begin
                dfs(c,h-tot1-1);
            end else begin
               if tot1<tot2 then begin
                   aa:=road2[(tot2-tot1)>>1];

                   //dfs(road2[aa],h-(tot1+tot2)>>1);
               end else begin
                   aa:=road1[(tot1-tot2)>>1];
                   //dfs(road1[aa],h-(tot1+tot2)>>1);
               end;
               if visit[ans[aa].a]=false then bb:=ans[aa].a else if visit[ans[aa].b]=false then bb:=ans[aa].b else bb:=ans[aa].c;
               dfs(bb,h-(tot1+tot2)>>1-1);
            end;
        end;
    end;
end.

type rec=record
    a,b,c:longint;
end;
var i,j,m,n,test,x,tot,a,b,c,h,ii,aa,tot1,tot2,bb,cc:longint;
    visit:array[0..200]of boolean;
    road,road1,road2:array[0..20]of longint;
    solved:boolean;
    ans:array[0..200]of rec;
procedure dfs3(u:longint);
var x,a,b,c,temp:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    writeln('? ',u);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end;
    if x=1 then begin
        readln(a);
        exit;
    end;
    readln(a,b,c);
    ans[u].a:=a;
    ans[u].b:=b;
    ans[u].c:=c;
    if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
    dfs3(temp);
end;
procedure dfs4(u:longint);
var x:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    if tot>2 then exit;
    writeln('? ',u);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end else if x=1 then begin
        readln(a);
        exit;
    end else begin
        readln(a,b,c);
        ans[u].a:=a;
        ans[u].b:=b;
        ans[u].c:=c;
        if visit[a]=false then begin
            dfs4(a);
        end else if visit[b]=false then begin
            dfs4(b);
        end else begin
            dfs4(c);
        end;
    end;
end;
procedure dfs2(u:longint);
var x:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    writeln('? ',u);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end else if x=1 then begin
        readln(a);
        exit;
    end else begin
        readln(a,b,c);
        ans[u].a:=a;
        ans[u].b:=b;
        ans[u].c:=c;
        if visit[a]=false then begin
            dfs2(a);
        end else if visit[b]=false then begin
            dfs2(b);
        end else begin
            dfs2(c);
        end;
    end;
end;
procedure dfs(now,dep:longint);
var x,temp,aa,a,b,c,bb,cc,temp2:longint;
begin
    visit[now]:=true;
    writeln('? ',now);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',now);
        solved:=true;
        exit;
    end;
    readln(a,b,c);
    if (dep=3) and (h=7) then begin
       tot:=0;
       if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
       dfs4(temp);
       if solved then exit;
       if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
       //dfs4(temp);
       writeln('? ',temp);
       flush(output);
       readln(x);
       if x=2 then begin
           readln(a,b);
           writeln('! ',temp);
           flush(output);
           solved:=true;

       end else begin
           readln(a,b,c);
           if visit[a]=false then temp2:=a else if visit[b]=false then temp2:=b else temp2:=c;
           visit[temp2]:=true;
           writeln('? ',temp2);
           flush(output);
           readln(x);
           if x=2 then begin
              readln(a,b);
              writeln('! ',temp2);
              flush(output);
              solved:=true;
              exit;
           end else begin
               if visit[a]=false then temp2:=a else if visit[b]=false then temp2:=b else temp2:=c;
               readln(aa,bb,cc);
               writeln('! ',temp2);
               flush(output);
               solved:=true;
               exit;
           end;
       end;
       exit;
    end;
    if (dep=2) and (h=7) then begin
        if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
        writeln('? ',temp);
        visit[temp]:=true;
        readln(x);
        if x=2 then begin
            readln(a,b);
            writeln('! ',temp);
            flush(output);
            solved:=true;
            exit;
        end;
        if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
        readln(a,b,c);
        writeln('! ',temp);
        flush(output);
        solved:=true;
        exit;
    end;
    if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
    if visit[temp]=false then begin
        tot:=0;
        dfs2(temp);
        if solved then exit;
        if tot=h-dep then begin
            if visit[a]=false then dfs(a,dep-1) else if visit[b]=false then dfs(b,dep-1) else dfs(c,dep-1);
        end else begin
            cc:=(tot-h+dep)>>1;
            aa:=road[(tot-h+dep)>>1];
            //dfs(road[aa],dep-aa);
            if visit[ans[aa].a]=false then bb:=ans[aa].a else if visit[ans[aa].b]=false then bb:=ans[aa].b else bb:=ans[aa].c;
            dfs(bb,dep-cc-1);
        end;
    end;

end;
begin
    readln(test);
    for ii:=1 to test do begin
        //ans:=0;
        solved:=false;
        dec(test);
        readln(h);
        fillchar(visit,sizeof(visit),false);
        writeln('? ',1);
        visit[1]:=true;
        flush(output);
        read(x);
        if x=2 then begin
           readln(a,b);
           writeln('! ',1);
           flush(output);
           continue;
        end else if x=1 then begin
            readln(a);
            dfs(a,h-1);
        end else begin
            readln(a,b,c);
            tot:=0;
            dfs3(a);
            if solved then continue;
            tot1:=tot;
            for i:=1 to tot do road1[i]:=road[i];
            tot:=0;
            dfs3(b);
            if solved then continue;
            tot2:=tot;
            for i:=1 to tot do road2[i]:=road[i];
            if tot1=tot2 then begin
                dfs(c,h-tot1-1);
            end else begin
               if tot1<tot2 then begin
                   aa:=road2[(tot2-tot1)>>1];

                   //dfs(road2[aa],h-(tot1+tot2)>>1);
               end else begin
                   aa:=road1[(tot1-tot2)>>1];
                   //dfs(road1[aa],h-(tot1+tot2)>>1);
               end;
               if visit[ans[aa].a]=false then bb:=ans[aa].a else if visit[ans[aa].b]=false then bb:=ans[aa].b else bb:=ans[aa].c;
               dfs(bb,h-(tot1+tot2)>>1-1);
            end;
        end;
    end;
end.

type rec=record
    a,b,c:longint;
end;
var i,j,m,n,test,x,tot,a,b,c,h,ii,aa,tot1,tot2,bb,cc:longint;
    visit:array[0..200]of boolean;
    road,road1,road2:array[0..20]of longint;
    solved:boolean;
    ans:array[0..200]of rec;
procedure dfs3(u:longint);
var x,a,b,c,temp:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    writeln('? ',u);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end;
    if x=1 then begin
        readln(a);
        exit;
    end;
    readln(a,b,c);
    ans[u].a:=a;
    ans[u].b:=b;
    ans[u].c:=c;
    if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
    dfs3(temp);
end;
procedure dfs4(u:longint);
var x:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    if tot>2 then exit;
    writeln('? ',u);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end else if x=1 then begin
        readln(a);
        exit;
    end else begin
        readln(a,b,c);
        ans[u].a:=a;
        ans[u].b:=b;
        ans[u].c:=c;
        if visit[a]=false then begin
            dfs4(a);
        end else if visit[b]=false then begin
            dfs4(b);
        end else begin
            dfs4(c);
        end;
    end;
end;
procedure dfs2(u:longint);
var x:longint;
begin
    visit[u]:=true;
    inc(tot);
    road[tot]:=u;
    writeln('? ',u);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',u);
        solved:=true;
        exit;
    end else if x=1 then begin
        readln(a);
        exit;
    end else begin
        readln(a,b,c);
        ans[u].a:=a;
        ans[u].b:=b;
        ans[u].c:=c;
        if visit[a]=false then begin
            dfs2(a);
        end else if visit[b]=false then begin
            dfs2(b);
        end else begin
            dfs2(c);
        end;
    end;
end;
procedure dfs(now,dep:longint);
var x,temp,aa,a,b,c,bb,cc,temp2:longint;
begin
    visit[now]:=true;
    writeln('? ',now);
    flush(output);
    read(x);
    if x=2 then begin
        readln(a,b);
        writeln('! ',now);
        solved:=true;
        exit;
    end;
    readln(a,b,c);
    if (dep=3) and (h=7) then begin
       tot:=0;
       if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
       dfs4(temp);
       if solved then exit;
       if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
       //dfs4(temp);
       writeln('? ',temp);
       flush(output);
       readln(x);
       if x=2 then begin
           readln(a,b);
           writeln('! ',temp);
           flush(output);
           solved:=true;

       end else begin
           readln(a,b,c);
           if visit[a]=false then temp2:=a else if visit[b]=false then temp2:=b else temp2:=c;
           visit[temp2]:=true;
           writeln('? ',temp2);
           flush(output);
           readln(x);
           if x=2 then begin
              readln(a,b);
              writeln('! ',temp2);
              flush(output);
              solved:=true;
              exit;
           end else begin
               if visit[a]=false then temp2:=a else if visit[b]=false then temp2:=b else temp2:=c;
               readln(aa,bb,cc);
               writeln('! ',temp2);
               flush(output);
               solved:=true;
               exit;
           end;
       end;
       exit;
    end;
    if visit[a]=false then temp:=a else if visit[b]=false then temp:=b else temp:=c;
    if visit[temp]=false then begin
        tot:=0;
        dfs2(temp);
        if solved then exit;
        if tot=h-dep then begin
            if visit[a]=false then dfs(a,dep-1) else if visit[b]=false then dfs(b,dep-1) else dfs(c,dep-1);
        end else begin
            cc:=(tot-h+dep)>>1;
            aa:=road[(tot-h+dep)>>1];
            //dfs(road[aa],dep-aa);
            if visit[ans[aa].a]=false then bb:=ans[aa].a else if visit[ans[aa].b]=false then bb:=ans[aa].b else bb:=ans[aa].c;
            dfs(bb,dep-cc-1);
        end;
    end;

end;
begin
    readln(test);
    for ii:=1 to test do begin
        //ans:=0;
        solved:=false;
        dec(test);
        readln(h);
        fillchar(visit,sizeof(visit),false);
        writeln('? ',1);
        visit[1]:=true;
        flush(output);
        read(x);
        if x=2 then begin
           readln(a,b);
           writeln('! ',1);
           flush(output);
           continue;
        end else if x=1 then begin
            readln(a);
            dfs(a,h-1);
        end else begin
            readln(a,b,c);
            tot:=0;
            dfs3(a);
            if solved then continue;
            tot1:=tot;
            for i:=1 to tot do road1[i]:=road[i];
            tot:=0;
            dfs3(b);
            if solved then continue;
            tot2:=tot;
            for i:=1 to tot do road2[i]:=road[i];
            if tot1=tot2 then begin
                dfs(c,h-tot1-1);
            end else begin
               if tot1<tot2 then begin
                   aa:=road2[(tot2-tot1)>>1];

                   //dfs(road2[aa],h-(tot1+tot2)>>1);
               end else begin
                   aa:=road1[(tot1-tot2)>>1];
                   //dfs(road1[aa],h-(tot1+tot2)>>1);
               end;
               if visit[ans[aa].a]=false then bb:=ans[aa].a else if visit[ans[aa].b]=false then bb:=ans[aa].b else bb:=ans[aa].c;
               dfs(bb,h-(tot1+tot2)>>1-1);
            end;
        end;
    end;
end.