#include <bits/stdc++.h>
using namespace std;
int lim = 1e6;
int inf = 1e8;
void err(istream_iterator<string> it) { cerr << endl; }
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << "\t";
  err(++it, args...);
}
template <typename T1, typename T2>
ostream& operator<<(ostream& c, pair<T1, T2>& v) {
  c << "(" << v.first << "," << v.second << ")";
  return c;
}
template <template <class...> class TT, class... T>
ostream& operator<<(ostream& out, TT<T...>& c) {
  out << "{ ";
  for (auto& x : c) out << x << " ";
  out << "}";
  return out;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int ans = 0;
    for (int i = 6; i >= 0; i--) {
      int k = pow(2, i);
      int j = 0;
      vector<int> a, b;
      for (int r = 1; r <= n; r++) {
        if ((r / k) % 2 == 0) {
          a.push_back(r);
        } else {
          b.push_back(r);
        }
      }
      if (a.size() == 0 or b.size() == 0) continue;
      cout << a.size() << " " << b.size() << " ";
      for (int j = 0; j < a.size(); j++) {
        cout << a[j] << " ";
      }
      for (int j = 0; j < b.size(); j++) {
        cout << b[j] << " ";
      }
      cout << endl;
      int tmpans;
      cin >> tmpans;
      ans = max(ans, tmpans);
    }
    cout << -1 << " " << ans << endl;
  }
}
