#include <bits/stdc++.h>
using namespace std;
template <typename T>
using min_queue = priority_queue<T, vector<T>, greater<T>>;
const long long MOD = 1e9 + 7;
int N;
int query(vector<int>& a, vector<int>& b) {
  cout << a.size() << ' ' << b.size();
  for (int k : a) cout << ' ' << k;
  for (int k : b) cout << ' ' << k;
  cout << endl;
  int q;
  cin >> q;
  return q;
}
int range(int k, int l, int r) {
  vector<int> a = {k}, b;
  for (int i = l; i <= r; i++) b.push_back(i);
  return query(a, b);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int T;
  cin >> T;
  while (T-- > 0) {
    cin >> N;
    int d = range(1, 2, N);
    if (d == -1) return 0;
    int l = 2, r = N;
    while (l < r) {
      int m = (l + r) / 2;
      int q = range(1, l, m);
      if (q == -1) return 0;
      if (q == d) {
        r = m;
      } else {
        l = m + 1;
      }
    }
    vector<int> a = {l}, b;
    for (int i = 1; i <= N; i++)
      if (i != l) b.push_back(i);
    int dd = query(a, b);
    cout << "-1 " << dd << endl;
  }
  return 0;
}
