#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a = 0, b = 0, c, d, e, f = 0, l, g = 0, m, n, k, i, j, t, p, q;
  cin >> t;
  vector<long long> v;
  a = 1;
  while (a < 150) {
    v.push_back(a);
    a *= 2;
  }
  while (t--) {
    g = 0;
    cin >> n;
    d = *upper_bound(v.begin(), v.end(), n);
    d /= 2;
    while (d) {
      f++;
      vector<long long> v1, v2;
      a = 1;
      c = 1;
      while (a <= n) {
        if (c % 2) {
          for (i = 0; a <= n && i < d; i++) {
            v1.push_back(a);
            a++;
          }
        } else {
          for (i = 0; a <= n && i < d; i++) {
            v2.push_back(a);
            a++;
          }
        }
        c++;
      }
      if (v1.size() && v2.size()) {
        cout << v1.size() << ' ' << v2.size() << ' ';
        for (i = 0; i < v1.size(); i++) {
          cout << v1[i] << ' ';
        }
        for (i = 0; i < v2.size(); i++) {
          cout << v2[i] << ' ';
        }
        cout << '\n' << flush;
        cin >> p;
        if (p > g) g = p;
      }
      d /= 2;
    }
    cout << -1 << ' ' << g << endl << flush;
  }
  return 0;
}
