#include <bits/stdc++.h>
using namespace std;
int main() {
  int tc, n, num, i, j;
  long long ans = 0;
  cin >> tc;
  while (tc--) {
    cin >> n;
    num = 1, ans = 0;
    for (i = 1; i <= 9; i++) {
      vector<int> v1, v2;
      for (j = 0; j < n; j++) {
        if ((j / num) & 1)
          v2.push_back(j);
        else
          v1.push_back(j);
      }
      num *= 2;
      if (v1.size() != 0 && v2.size() != 0) {
        cout << v1.size() << " " << v2.size();
        for (j = 0; j < v1.size(); j++) cout << " " << v1[j] + 1;
        for (j = 0; j < v2.size(); j++) cout << " " << v2[j] + 1;
        cout << endl;
        long long comm;
        cin >> comm;
        if (comm == -1) return 0;
        ans = max(comm, ans);
      }
    }
    cout << "-1"
         << " " << ans << endl;
  }
  return 0;
}
