#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  int ts;
  cin >> ts;
  while (ts--) {
    cin >> n;
    int ask = 0;
    for (int i = 0; i <= 8; ++i) {
      vector<int> g, p;
      for (int j = 1; j <= n; ++j) {
        if ((j >> i) & 1) {
          g.push_back(j);
        } else {
          p.push_back(j);
        }
      }
      if (g.empty() or p.empty()) {
        continue;
      }
      cout << g.size() << " " << p.size() << " ";
      for (auto curr : g) {
        cout << curr << " ";
      }
      for (auto curr : p) {
        cout << curr << " ";
      }
      cout << endl;
      cout << flush;
      int diam;
      cin >> diam;
      ask = max(ask, diam);
    }
    cout << -1 << " " << ask << endl;
  }
  return 0;
}
