#include <bits/stdc++.h>

typedef long long int ll;
typedef long double ld;
using namespace std;
#define P 1000000007
#define rep(i,n) for(i=0;i<n;++i)
#define re(i,a,n) for(i=a;i<=n;++i)
#define repr(i,a,n) for(i=a;i>=n;--i)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define ub(v,val) upper_bound(v.begin(),v.end(),val)
#define np(str) next_permutation(str.begin(),str.end())
#define lb(v,val) lower_bound(v.begin(),v.end(),val)
#define sortv(vec) sort(vec.begin(),vec.end())
#define rev(p) reverse(p.begin(),p.end());
#define mset(a,val) memset(a,val,sizeof(a));
#define at(s,pos) *(s.find_by_order(pos))
#define set_ind(s,val) s.order_of_key(val)
#define PI 3.14159265
/*#include <ext/pb_ds/assoc_container.hpp> // Common file  
#include <ext/pb_ds/tree_policy.hpp>  
#include <functional> // for less  
#include <iostream>  
// Important header files   
using namespace __gnu_pbds;  
using namespace std;  
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;*/

 



vector<int> pr;

/*int calc_hash(string const& s) {
    ll n = s.size();

    const int p = 31;
    const int m = 1e9 + 9;
    vector<long long> p_pow(n);
    p_pow[0] = 1;
    for (int i = 1; i < n; i++)
        p_pow[i] = (p_pow[i-1] * p) % m;

    vector<long long> h(n + 1, 0);
    for (int i = 0; i < n; i++)
        h[i+1] = (h[i] + (s[i] - 'a' + 1) * p_pow[i]) % m;

    int cnt = 0;
    for (int l = 1; l <= n; l++) {
        set<long long> hs;
        for (int i = 0; i <= n - l; i++) {
            long long cur_h = (h[i + l] + m - h[i]) % m;
            cur_h = (cur_h * p_pow[n-i-1]) % m;
            hs.insert(cur_h);
        }
        cnt += hs.size();
    }
    return cnt;
}

const ll MAXN=2e5+1;
ll spf[MAXN];
void sieve() 
{ 
    spf[1] = 1; 
    ll i,j;
    for (i=2; i<MAXN; i++) 
          spf[i] = i; 
  
    for (i=4; i<MAXN; i+=2) 
        spf[i] = 2; 
  
    for (i=3; i*i<MAXN; i++) 
    { 
        
        if (spf[i] == i) 
        { 
            
            for (j=i*i; j<MAXN; j+=i) 
  
                if (spf[j]==j) 
                    spf[j] = i; 
        } 
    } 
    for(i=2;i<MAXN;++i) if(spf[i]==i) pr.pb(i);
 }


*/


/*void SieveOfEratosthenes(int n)
{
    
    bool prime[n + 1];
    memset(prime, true, sizeof(prime));
 
    for (int p = 2; p * p <= n; p++)
    {
        
        if (prime[p] == true) 
        {
           
            for (int i = p * p; i <= n; i += p)
                prime[i] = false;
        }
    }
 
    
    for (int p = 2; p <= n; p++)
        if (prime[p])
            pr.pb(p);
}*/


/*typedef struct trie
{
  typedef struct node
  {
    node* nxt[2];
    int cnt = 0;

    node()
    {
      nxt[0] = nxt[1] = NULL;
      cnt = 0;
    }

  } Node;

  Node* head;

  trie() { head = new Node(); }

  void init() { head = new Node(); }

  void add(int x)
  {
    Node* cur = head;
    for (int i = 30; i >= 0; i--)
    {
      int b = (x >> i) & 1;
      if (!cur -> nxt[b])
        cur -> nxt[b] = new Node();
      cur = cur -> nxt[b];
      cur -> cnt++;
    }
  }

  void del(int x) {
    Node* cur = head;
    for (int i = 30; i >= 0; i--)
    {
      int b = (x >> i) & 1;
      cur = cur -> nxt[b];
      cur -> cnt--;
    }
  }

  int query(int x, int k)
  {
    //change
    return something;
  }

} Trie;
Trie tv;
*/



int main() 
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
   ll t,i,j,l,r,f,e,x,y,mid,z,w,k,d,c,b,a,q,n,m;
   ll t1,t2,t3,ans=0,tc ;
  cin >> t ;

   while(t--)
   {
       cin >> n ;
       l=1;
       vector<ll> res;

       while(true)
       {
          
          cout << "?  "<< l << " " << 1 << endl ;
          re(i,1,l) cout << i << " " ;
          cout << endl << l+1 << endl ;
          
          cin >> x ;
          if(x==0) 
          {
             
              l++;
          }
          else break;
         
       }
       r=l+1;
       for(j=r+1;j<=n;++j)
       {
          cout << "?  1 1" << endl ;
          cout <<  r << endl ;
          cout << j << endl ;
          cin >> x ;
          if(x==0) res.pb(j);
          //r++; 
       }
       j=r;
       r=l;
       l=1;
       ll mid;
       ans=0;
       while(l<=r)
       {
          mid=l+(r-l)/2;
          cout << "? 1 " << mid-l+1 << endl ;
          cout << j << endl ;
          for(i=l;i<=mid;++i) cout << i << " " ;
          cout << endl ;
          cin >> x ;
          if(x==0) 
          {
              l=mid+1;
          } 
          else 
          {
              r=mid-1;
              ans=mid;
          }
       }
       
       re(i,1,j-1) if(i!=ans) res.pb(i); 
       cout << "! " << res.size() << " "  ;
       rep(i,res.size()) cout << res[i] << " " ;
       cout << endl ;

   }

  
   
    




    
  return 0;
        
}