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