#include <bits/stdc++.h>
const int mod = 1000000000 + 7;
using namespace std;
void no(int p = -1) {
  cout << "NIE"
       << "\n";
}
int n, q, t;
int ans = 0;
void func() {
  int ans = 0, u;
  cin >> n;
  for (int i = 0; i < 7; i++) {
    vector<int> a, b;
    for (int j = 1; j <= n; j++) {
      if (j & (1 << i))
        a.push_back(j);
      else
        b.push_back(j);
    }
    if (a.size() > 0) {
      cout << a.size() << " " << b.size() << " ";
      for (size_t i = 0; i < a.size(); i++) cout << a[i] << " ";
      for (size_t i = 0; i < b.size(); i++) cout << b[i] << " ";
      cout << "\n";
      cout.flush();
      cin >> u;
      ans = max(ans, u);
    }
  }
  cout << "-1 " << ans << "\n";
  cout.flush();
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> t;
  while (t) {
    func();
    t--;
  }
}
