#include <bits/stdc++.h>
using namespace std;
int ask(vector<int> a, vector<int> b) {
  cout << a.size() << ' ' << b.size();
  for (int i : a) cout << ' ' << i + 1;
  for (int i : b) cout << ' ' << i + 1;
  cout << endl;
  int res;
  cin >> res;
  return res;
}
int main() {
  int T;
  cin >> T;
  for (int Case = 0; Case < (T); Case++) {
    int n;
    scanf("%d", &n);
    vector<int> a{0};
    vector<int> b;
    for (int i = 1; i < n; i++) b.push_back(i);
    int M = ask(a, b);
    while (b.size() > 1) {
      vector<int> c(b.begin(), b.begin() + b.size() / 2);
      if (ask(a, c) == M)
        b = c;
      else {
        c = vector<int>(b.begin() + b.size() / 2, b.end());
        b = c;
      }
    }
    a.clear();
    for (int i = 0; i < (n); i++) {
      if (b[0] != i) a.push_back(i);
    }
    int ans = ask(b, a);
    cout << -1 << ' ' << ans << endl;
  }
}
