#include <bits/stdc++.h>
using namespace std;
long long g;
int dist[105];
int cnt = 0;
int ask(vector<int> &a, vector<int> &b) {
  cout << a.size() << ' ' << b.size() << ' ';
  for (int x : a) {
    cout << x << ' ';
  }
  for (int x : b) {
    cout << x << ' ';
  }
  cout << endl;
  cout.flush();
  int ans;
  cin >> ans;
  if (ans == -1) {
    exit(0);
  }
  cnt++;
  return ans;
}
int main() {
  long long t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    int ans = 0;
    for (int i = 0; i < 9; ++i) {
      vector<int> a, b;
      for (int j = 0; j < n; ++j) {
        if (j & (1 << i)) {
          a.push_back(j + 1);
        } else {
          b.push_back(j + 1);
        }
      }
      if (a.size() && b.size()) {
        ans = max(ans, ask(a, b));
      }
    }
    cout << "-1 " << ans << endl;
  }
  return 0;
}
