#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
int T, top1, top2, st1[N], st2[N], n;
int main(void) {
  scanf("%d", &T);
  while (T--) {
    scanf("%d", &n);
    int ans = 0;
    for (int i = 0; n >> i; i++) {
      top1 = top2 = 0;
      for (int j = 1; j <= n; j++)
        if (j >> i & 1)
          st2[++top2] = j;
        else
          st1[++top1] = j;
      if (top1 && top2) {
        int now = 0;
        printf("%d %d ", top1, top2);
        for (int i = 1; i <= top1; i++) printf("%d ", st1[i]);
        for (int i = 1; i <= top2; i++) printf("%d ", st2[i]);
        puts("");
        fflush(stdout);
        scanf("%d", &now);
        ans = max(ans, now);
      }
    }
    printf("-1 %d\n", ans);
    fflush(stdout);
  }
  return 0;
}
