#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, div = 1, ans = 0;
    cin >> n;
    long long int tt = log2(n);
    vector<long long int> w;
    if (log2(n) != tt) tt++;
    for (long long int i = 0; i < n; i++) w.push_back(i + 1);
    for (long long int j = 0; j < tt; j++) {
      vector<long long int> v, u;
      for (long long int i = 0; i < n;) {
        for (long long int j = i; j < i + div; j++) {
          if (j >= n) break;
          v.push_back(w[j]);
        }
        i += div;
        for (long long int j = i; j < i + div; j++) {
          if (j >= n) break;
          u.push_back(w[j]);
        }
        i += div;
      }
      cout << v.size() << " " << u.size() << " ";
      for (long long int i = 0; i < v.size(); i++) cout << v[i] << " ";
      for (long long int i = 0; i < u.size(); i++) cout << u[i] << " ";
      cout << '\n';
      long long int xxx;
      cin >> xxx;
      ans = max(xxx, ans);
      div *= 2;
      if (xxx == -1) {
        cout << ans;
        exit(0);
      }
    }
    cout << "-1 " << ans << '\n';
  }
}
