#include <bits/stdc++.h>
using namespace std;
const int N = 1024, INF = 1e9 + 10;
vector<int> minn[N];
vector<int> fix(const vector<int> &v, int n) {
  vector<int> u;
  for (int k : v)
    if (k < n) u.push_back(k + 1);
  return u;
}
vector<int> print(vector<int> v, int n) {
  v = fix(v, n);
  if ((int)((v).size()) == 0) return vector<int>(n, INF);
  printf("%d\n", (int)((v).size()));
  for (int l : v) printf("%d ", l);
  printf("\n");
  fflush(stdout);
  vector<int> u(n);
  for (int i = 0; (i) < (n); ++i) scanf("%d", &u[i]);
  return u;
}
void printAns(vector<int> v) {
  printf("%d\n", -1);
  for (int l : v) printf("%d ", l);
  printf("\n");
  fflush(stdout);
  exit(0);
}
int get(int ind, int k, int row) {
  int curN = N / 2, curIt = 9;
  int curAns = INF;
  while (curN > 0) {
    if (k >= curN) {
      curAns = min(curAns, minn[curIt * 2 + ind][row]), k -= curN;
    }
    curIt--;
    curN /= 2;
  }
  return curAns;
}
int main() {
  int n;
  scanf("%d", &n);
  int two = 1;
  int it = 0;
  while (two < N) {
    vector<int> v1, v2;
    for (int i = 0; i < N; i += 2 * two) {
      for (int j = (i); (j) < (i + two); ++j) v1.push_back(j);
      for (int j = (i + two); (j) < (i + 2 * two); ++j) v2.push_back(j);
    }
    two *= 2;
    minn[it++] = print(v1, n);
    minn[it++] = print(v2, n);
  }
  vector<int> ans;
  for (int i = 0; (i) < (n); ++i) {
    ans.push_back(min(get(0, i, i), get(1, N - 1 - i, i)));
  }
  printAns(ans);
  return 0;
}
