#include <bits/stdc++.h>
using namespace std;
signed main() {
  int q;
  cin >> q;
  while (q--) {
    int ans = 0;
    int n;
    cin >> n;
    for (int bt = 0; bt < 9; ++bt) {
      vector<int> a, b;
      for (int i = 0; i < n; ++i) {
        if ((1 << bt) & i) {
          a.push_back(i);
        } else {
          b.push_back(i);
        }
      }
      if (a.size() && b.size()) {
        cout << a.size() << " " << b.size() << " ";
        for (auto i : a) {
          cout << i + 1 << " ";
        }
        for (auto i : b) {
          cout << i + 1 << " ";
        }
        cout << endl;
        int t;
        cin >> t;
        ans = max(ans, t);
      }
    }
    cout << "-1 " << ans << endl;
  }
}
