#include <bits/stdc++.h>
using namespace std;
using LL = long long;
int query(int n, int bit) {
  vector<int> a, b;
  for (int i = 1; i <= n; i++) {
    if ((i >> bit) & 1)
      a.push_back(i);
    else
      b.push_back(i);
  }
  if (a.empty() || b.empty()) return 0;
  cout << a.size() << ' ' << b.size();
  for (int i : a) cout << ' ' << i;
  for (int i : b) cout << ' ' << i;
  cout << '\n';
  cout.flush();
  int res;
  cin >> res;
  return res;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int ans = 0;
    for (int bit = 0; bit < 9; bit++) {
      ans = max(ans, query(n, bit));
    }
    cout << "-1 " << ans << endl;
    cout.flush();
  }
  return 0;
}
