#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, ans = -1;
  cin >> n;
  for (int i = 0; i < 9; ++i) {
    vector<int> a, b;
    for (int j = 1; j <= n; ++j) {
      if (j & (1 << i))
        a.push_back(j);
      else
        b.push_back(j);
    }
    if (a.empty() || b.empty()) continue;
    cout << a.size() << ' ' << b.size() << ' ';
    for (auto u : a) cout << u << ' ';
    for (auto u : b) cout << u << ' ';
    cout << endl;
    int t;
    cin >> t;
    ans = max(ans, t);
  }
  cout << -1 << ' ' << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
