#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int mx = 0;
    for (int i = 0; i < 7; i++) {
      vector<int> a, b;
      for (int j = 1; j < n + 1; j++) {
        if (j & (1 << i))
          a.push_back(j);
        else
          b.push_back(j);
      }
      if (a.size() == 0 || b.size() == 0) continue;
      cout << (int)a.size() << " " << (int)b.size() << " ";
      for (int p : a) {
        cout << p << " ";
      }
      for (int q : b) {
        cout << q << " ";
      }
      cout << endl;
      int temp;
      cin >> temp;
      mx = max(mx, temp);
    }
    cout << -1 << " " << mx << endl;
  }
}
