#include <bits/stdc++.h>
using namespace std;
long long int power(long long int a, long long int b, long long int m) {
  long long int ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    vector<long long int> ans;
    for (long long int i = 0; i < 10; i++) {
      cout << " " << endl;
      vector<long long int> a, b;
      for (long long int j = 1; j < n + 1; j++) {
        if ((1 << i) & j)
          a.push_back(j);
        else
          b.push_back(j);
      }
      if (!a.size() || !b.size()) continue;
      cout << a.size() << " " << b.size() << " ";
      for (long long int k = 0; k < a.size(); k++) cout << a[k] << " ";
      for (long long int k = 0; k < b.size(); k++) cout << b[k] << " ";
      cout << " " << endl;
      long long int x;
      cin >> x;
      ans.push_back(x);
    }
    sort((ans).begin(), (ans).end());
    cout << -1 << " " << *ans.rbegin() << endl;
  }
}
