#include <bits/stdc++.h>
using namespace std;
const int maxn = 100;
int n;
int res;
set<int> level[maxn + 1];
void bfs(int l, int r, int lev, bool incl) {
  if (incl) {
    for (int i = l; i <= r; i++) level[lev].insert(i);
  }
  if (l != r) {
    int m = (l + r) / 2;
    bfs(l, m, lev + 1, true);
    bfs(m + 1, r, lev + 1, false);
  }
}
int query(int lev) {
  if (level[lev].size() == 0) return -1;
  cout << level[lev].size() << ' ' << n - level[lev].size() << ' ';
  for (int i = 1; i <= n; i++)
    if (level[lev].count(i)) cout << i << ' ';
  for (int i = 1; i <= n; i++)
    if (!level[lev].count(i)) cout << i << ' ';
  cout << endl;
  int res;
  cin >> res;
  return res;
}
void answer(int x) { cout << "-1 " << x << endl; }
void solve() {
  cin >> n;
  for (int i = 1; i <= 10; i++) level[i].clear();
  bfs(1, n, 1, true);
  int res = 0;
  for (int i = 2; i <= 10; i++) res = max(res, query(i));
  answer(res);
}
int main() {
  ios_base::sync_with_stdio(0);
  srand(time(NULL));
  int t;
  cin >> t;
  for (int i = 1; i <= t; i++) solve();
  return 0;
}
