#include <bits/stdc++.h>
using namespace std;
template <typename T>
istream& operator>>(istream& is, vector<T>& v) {
  for (auto& i : v) is >> i;
  return is;
}
template <typename T>
ostream& operator<<(ostream& os, vector<T>& v) {
  for (auto& i : v) os << i << ' ';
  return os;
}
template <typename T, typename U>
istream& operator>>(istream& is, pair<T, U>& p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T, typename U>
ostream& operator<<(ostream& os, pair<T, U>& p) {
  os << p.first << ' ' << p.second;
  return os;
}
int main() {
  int tests;
  cin >> tests;
  for (int test = 0; test < tests; ++test) {
    int n;
    cin >> n;
    int ans = -1000000;
    for (int i = 0; i < 9; ++i) {
      vector<int> a, b;
      for (int j = 0; j < n; ++j) {
        if ((j >> i) & 1)
          a.push_back(j + 1);
        else
          b.push_back(j + 1);
      }
      if (a.size() == 0 || b.size() == 0) continue;
      cout << a.size() << ' ' << b.size() << ' ' << a << b << endl;
      int d;
      cin >> d;
      if (d == -1) return 0;
      ans = max(ans, d);
    }
    cout << "-1 " << ans << endl;
  }
  return 0;
}
