#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  vector<int> s[101];
  for (int i = 1; i <= 100; i++) {
    int c = i;
    for (int j = 0; j < 9; j++) s[i].push_back(c % 2), c /= 2;
  }
  while (t--) {
    int n;
    cin >> n;
    int i = 0, mx = -1;
    while (i < 9) {
      vector<int> v1, v2;
      for (int j = 1; j <= n; j++)
        if (s[j][i])
          v1.push_back(j);
        else
          v2.push_back(j);
      if (v1.size() && v2.size()) {
        cout << v1.size() << " " << v2.size();
        for (int i = 0; i < v1.size(); i++) cout << " " << v1[i];
        for (int i = 0; i < v2.size(); i++) cout << " " << v2[i];
        cout << endl;
        int x;
        cin >> x;
        mx = max(mx, x);
      }
      i++;
    }
    cout << -1 << " " << mx << endl;
  }
}
