#include <bits/stdc++.h>
using namespace std;
int t, mx;
vector<pair<vector<int>, vector<int> > > v;
int c(int l, int r, int lvvl) {
  if (l >= r) return 0;
  for (int i = l; i <= (l + r) / 2; i++) v[lvvl].first.push_back(i);
  for (int i = (l + r) / 2 + 1; i <= r; i++) v[lvvl].second.push_back(i);
  c(l, (l + r) / 2, lvvl + 1), c((l + r) / 2 + 1, r, lvvl + 1);
  return 0;
}
int main() {
  cin >> t;
  while (t--) {
    v.clear();
    v.resize(10);
    mx = 0;
    int m;
    cin >> m;
    c(1, m, 0);
    for (int i = 0; i < 10; i++) {
      if (!v[i].first.size()) break;
      cout << v[i].first.size() << " " << v[i].second.size() << " ";
      for (int j = 0; j < v[i].first.size(); j++) cout << v[i].first[j] << " ";
      for (int j = 0; j < v[i].second.size(); j++)
        cout << v[i].second[j] << " ";
      cout << endl;
      int ans;
      cin >> ans;
      mx = max(mx, ans);
    }
    cout << "-1 " << mx << endl;
  }
  return 0;
}
