#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long double pii = 3.14159265359;
const int MOD = 1000000007;
const int MX = 200001;
void solve() {
  int N;
  cin >> N;
  int ans = INT_MIN;
  for (int step = 0; step < (9); step++) {
    vector<int> v[2];
    int val = (1 << (step));
    for (int x = 1; x < (N + 1); x++) {
      v[(x / val) % 2].push_back(x);
    }
    if ((int)(v[1]).size() == 0) break;
    cout << (int)(v[0]).size() << ' ' << (int)(v[1]).size() << ' ';
    for (auto& i : v[0]) cout << i << ' ';
    for (auto& i : v[1]) cout << i << ' ';
    cout << endl;
    int nb;
    cin >> nb;
    ckmax(ans, nb);
  }
  cout << -1 << ' ' << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int Test_case = 1;
  cin >> Test_case;
  while (Test_case-- != 0) {
    solve();
  }
  return 0;
}
