#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int cpN = n - 1;
    int a = 0;
    int ans = 0;
    while (cpN > 0) {
      vector<int> va;
      vector<int> vb;
      for (int i = 0; i < n; ++i) {
        if (((i >> a) % 2) == 0) {
          va.push_back(i);
        } else {
          vb.push_back(i);
        }
      }
      cout << va.size() << ' ';
      cout << vb.size() << ' ';
      for (auto e : va) {
        cout << e + 1 << ' ';
      }
      for (auto e : vb) {
        cout << e + 1 << ' ';
      }
      cout << endl;
      int cur;
      cin >> cur;
      ans = max(ans, cur);
      cpN /= 2;
      a++;
    }
    cout << "-1 " << ans << endl;
  }
  return 0;
}
