#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int t;
  cin >> t;
  for (long long int x = 0; x < t; x++) {
    long long int n;
    cin >> n;
    long long int ans = 0;
    long long int prevMaxSize = n;
    vector<vector<long long int> > prevArr(1);
    for (long long int i = 1; i < n + 1; i++) {
      prevArr[0].push_back(i);
    }
    while (prevMaxSize > 1) {
      vector<vector<long long int> > split;
      long long int size = 0;
      for (auto arr : prevArr) {
        long long int mid = ((int)(arr).size()) / 2;
        vector<long long int> x(arr.begin(), arr.begin() + mid);
        vector<long long int> y(arr.begin() + mid, arr.end());
        split.push_back(x);
        split.push_back(y);
        size = max((long long int)((int)(x).size()),
                   max((long long int)((int)(y).size()), size));
      }
      vector<long long int> q1;
      vector<long long int> q2;
      for (long long int i = 0; i < ((int)(split).size()); i++) {
        for (auto item : split[i]) {
          if (i % 2 == 0) {
            q1.push_back(item);
          } else {
            q2.push_back(item);
          }
        }
      }
      cout << ((int)(q1).size()) << " " << ((int)(q2).size()) << " ";
      for (auto item : q1) {
        cout << item << " ";
      }
      for (auto item : q2) {
        cout << item << " ";
      }
      cout << endl;
      long long int x;
      cin >> x;
      ans = max(x, ans);
      prevMaxSize = size;
      prevArr = split;
    }
    cout << "-1 " << ans << endl;
  }
  return 0;
}
