#include <bits/stdc++.h>
const int INF = 2000000005;
const long long BIG_INF = 2000000000000000005;
const int mod = 1000000007;
const int P = 31;
using namespace std;
vector<pair<int, int> > dir = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}};
bool valid(int x, int y, int n, int m) {
  return x >= 0 && y >= 0 && x < n && y < m;
}
mt19937 rng(1999999973);
signed main() {
  int t;
  cin >> t;
  while (t--) {
    int ans = 0, n;
    cin >> n;
    for (int i = 0; i <= 8; i++) {
      vector<int> a, b;
      for (int j = 1; j <= n; j++) {
        if ((j >> i) & 1)
          a.push_back(j);
        else
          b.push_back(j);
      }
      if (a.size() == 0 || b.size() == 0) continue;
      cout << a.size() << " " << b.size() << " ";
      for (int i = 0; i < a.size(); i++) cout << a[i] << " ";
      for (int i = 0; i < b.size(); i++) cout << b[i] << " ";
      cout << '\n';
      int c;
      cin >> c;
      ans = max(ans, c);
    }
    cout << "-1 " << ans << '\n';
  }
  return 0;
}
