#include <bits/stdc++.h>
using namespace std;
long long q, n, m, x, c, sum, sz, maks, ans;
int main() {
  cin >> q;
  for (int rr = 0; rr < q; rr++) {
    vector<long long> v[10][101];
    cin >> n;
    sum = 0, maks = 0, sz = 1, ans;
    x = log2(n);
    if (pow(2, x) != n) {
      x++;
    }
    for (int i = 1; i <= n; i++) {
      v[0][0].push_back(i);
    }
    for (int t = 1; t <= x; t++) {
      sum = 0, ans = 0;
      for (int i = 0; i < sz; i++) {
        c = v[t - 1][i].size() / 2;
        ans += c;
        for (int j = 0; j < c; j++) {
          v[t][sum].push_back(v[t - 1][i][j]);
        }
        sum++;
        for (int j = c; j < v[t - 1][i].size(); j++) {
          v[t][sum].push_back(v[t - 1][i][j]);
        }
        sum++;
      }
      cout << ans << " " << n - ans << " ";
      for (int i = 0; i < sum; i += 2) {
        for (int j = 0; j < v[t][i].size(); j++) {
          cout << v[t][i][j] << " ";
        }
      }
      for (int i = 1; i < sum; i += 2) {
        for (int j = 0; j < v[t][i].size(); j++) {
          cout << v[t][i][j] << " ";
        }
      }
      cout << '\n';
      fflush(stdout);
      cin >> m;
      maks = max(maks, m);
      sz *= 2;
    }
    cout << -1 << " " << maks << '\n';
  }
}
