#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7, N = 4e5 + 10;
void solve() {
  long long n;
  cin >> n;
  vector<int> v(n + 1);
  vector<int> tem(n + 1);
  vector<int> tem2(n + 1);
  for (int i = 0; i < n; i++) {
    v[i] = i + 1;
    tem[i] = i + 1;
  }
  long long min = -1;
  int n2 = n;
  long long c = 0;
  while (n2 != 1) {
    n2 = n2 / 2;
    c++;
  }
  while (c >= 0) {
    cout << n / 2 << " " << n - n / 2 << " ";
    for (int i = 0; i < n; i++) {
      cout << tem[i] << " ";
      tem2[i] = tem[i];
    }
    cout << "\n";
    tem.clear();
    int x;
    cin >> x;
    if (x > min) min = x;
    for (int i = 0; i < n; i++) {
      if (i % 2 == 1) tem.push_back(tem2[i]);
    }
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0) tem.push_back(tem2[i]);
    }
    int flag = 0;
    for (int i = 0; i < n; i++) {
      if (tem[i] != v[i]) {
        flag = 1;
        break;
      }
    }
    c--;
    if (flag == 0) break;
  }
  cout << "-1 " << min << "\n";
  return;
}
int32_t main() {
  int test = 1;
  cin >> test;
  while (test--) {
    solve();
  }
}
