#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long ans = 0;
    for (long long j = 0; j < 9; j++) {
      vector<long long> v1, v2;
      for (long long i = 1; i <= n; i++) {
        if (i & (1 << j)) {
          v1.push_back(i);
        } else
          v2.push_back(i);
      }
      if (v1.empty() || v2.empty()) continue;
      cout << v1.size() << " " << v2.size() << " ";
      for (auto it : v1) cout << it << " ";
      for (auto it : v2) cout << it << " ";
      cout << "\n";
      long long x;
      cin >> x;
      ans = max(ans, x);
      fflush(stdout);
    }
    cout << -1 << " " << ans << "\n";
  }
}
