#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
const int M = 1e9 + 7;
vector<int> v[10][2];
void func(int l, int r, int k) {
  if (r - l == 0) return;
  int m = (r - l + 1) / 2;
  for (int i = l; i <= r; i++) {
    if (i < l + m)
      v[k + 1][0].push_back(i);
    else
      v[k + 1][1].push_back(i);
  }
  func(l, l + m - 1, k + 1);
  func(l + m, r, k + 1);
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    for (int i = 0; i <= 10; i++) {
      v[i][0].clear();
      v[i][1].clear();
    }
    int n, x, ans = 0;
    cin >> n;
    func(1, n, 0);
    for (int i = 1; i <= 9; i++) {
      if (v[i][0].size() == 0) break;
      cout << v[i][0].size() << " " << v[i][1].size() << " ";
      for (int j = 0; j < v[i][0].size(); j++) cout << v[i][0][j] << " ";
      for (int j = 0; j < v[i][1].size(); j++) cout << v[i][1][j] << " ";
      cout << endl;
      cin >> x;
      ans = max(x, ans);
    }
    cout << "-1 " << ans << endl;
  }
}
