#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  t = 1;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long i;
    long long maxi = -1;
    for (i = 0; i < 9; i++) {
      long long x = (1 << i);
      if (x > n) {
        break;
      }
      long long j;
      vector<long long> v1, v2;
      for (j = 1; j < n + 1; j++) {
        if (j & x) {
          v1.push_back(j);
        } else {
          v2.push_back(j);
        }
      }
      cout << v1.size() << " " << v2.size() << " ";
      long long l1 = v1.size();
      long long l2 = v2.size();
      long long q;
      for (q = 0; q < l1; q++) {
        cout << v1[q] << " ";
      }
      for (q = 0; q < l2; q++) {
        cout << v2[q] << " ";
      }
      cout.flush();
      cout << endl;
      long long yay;
      cin >> yay;
      maxi = max(yay, maxi);
    }
    cout << -1 << " " << maxi << endl;
    cout.flush();
  }
  return 0;
}
