#include <bits/stdc++.h>
using namespace std;
int tc;
vector<int> a, b;
int ask() {
  fflush(stdout);
  cout << a.size() << ' ' << b.size() << ' ';
  for (int x : a) cout << x + 1 << ' ';
  for (int x : b) cout << x + 1 << ' ';
  cout << endl;
  int res;
  cin >> res;
  return res;
}
void solve() {
  int n;
  cin >> n;
  int ans = 0;
  for (int j = 0; j < 9; ++j) {
    a.clear();
    b.clear();
    for (int mask = 0; mask < n; ++mask) {
      if (mask >> j & 1)
        a.push_back(mask);
      else
        b.push_back(mask);
    }
    if (a.empty() || b.empty()) continue;
    ans = max(ans, ask());
  }
  cout << -1 << ' ' << ans << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> tc;
  while (tc--) solve();
}
