#include <bits/stdc++.h>
using namespace std;
long long po(long long x, long long y) {
  if (y == 0)
    return 1;
  else
    return x * po(x, y - 1);
}
vector<long long> a[7], b[7];
void solve(long long l, long long r, long long d) {
  if (l == r) return;
  long long m = (l + r) >> 1;
  for (long long i = l; i <= m; i++) a[d].push_back(i);
  for (long long i = m + 1; i <= r; i++) b[d].push_back(i);
  solve(l, m, d + 1);
  solve(m + 1, r, d + 1);
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    for (long long i = 0; i < 7; i++) {
      a[i].clear();
      b[i].clear();
    }
    solve(1, n, 0);
    long long ans = 0;
    for (long long i = 0; i < 7; i++) {
      if (a[i].empty() || b[i].empty()) break;
      cout << a[i].size() << " " << b[i].size() << " ";
      for (auto it : a[i]) cout << it << " ";
      for (auto it : b[i]) cout << it << " ";
      cout << endl;
      long long x;
      cin >> x;
      ans = max(ans, x);
    }
    cout << "-1 " << ans << endl;
  }
  return 0;
}
