#include <bits/stdc++.h>
using namespace std;
const long long int mod = 998244353;
long long int maxi = 0;
void askquery(long long int n) {
  long long int dist;
  for (long long int i = 0; i < 8; i++) {
    vector<long long int> a, b;
    for (long long int j = 0; j < n; j++) {
      if ((1 << i) & j) {
        a.push_back(j);
      } else
        b.push_back(j);
    }
    if (a.empty() || b.empty()) continue;
    cout << a.size() << " " << b.size() << " ";
    for (auto x : a) {
      cout << x + 1 << " ";
    }
    for (auto x : b) {
      cout << x + 1 << " ";
    }
    cout << '\n';
    cin >> dist;
    maxi = max(maxi, dist);
  }
  cout << -1 << " " << maxi << '\n';
}
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    maxi = 0;
    askquery(n);
  }
}
