#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  vector<long long> a, b;
  a.clear();
  b.clear();
  long long ans = 0;
  for (long long i = 2; i / 2 < n; i *= 2) {
    for (long long j = 1; j <= n; j += i) {
      for (long long k = j; k < j + i / 2; k++) {
        if (k > n) break;
        a.push_back(k);
      }
      for (long long k = j + i / 2; k < j + i; k++) {
        if (k > n) break;
        b.push_back(k);
      }
    }
    cout << a.size() << " " << b.size() << " ";
    for (long long k = 0; k < a.size(); k++) {
      cout << a[k] << " ";
    }
    for (long long k = 0; k < b.size(); k++) {
      cout << b[k] << " ";
    }
    cout << endl;
    a.clear();
    b.clear();
    cout.flush();
    long long in;
    cin >> in;
    ans = max(ans, in);
  }
  cout << -1 << " " << ans << endl;
}
int main() {
  long long t;
  cin >> t;
  while (t--) solve();
  return 0;
}
