#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> response[10][2];
vector<int> sol;
vector<int> ask(int n2, int div, int rem) {
  vector<int> toask;
  for (int i = (0); i < (n); ++i)
    if (((i & (1 << div)) > 0) == rem) toask.push_back(i);
  printf("%d\n", toask.size());
  for (int i = (0); i < ((int)(toask.size()) - 1); ++i)
    printf("%d ", toask[i] + 1);
  printf("%d\n", toask.back() + 1);
  fflush(stdout);
  vector<int> reply(n);
  for (int i = (0); i < (n); ++i) scanf("%d", &reply[i]);
  return reply;
}
int main() {
  cin >> n;
  int next2 = 1;
  int query = 0;
  while (next2 < n) {
    next2 <<= 1;
    ++query;
  }
  for (int i = (0); i < (query); ++i)
    for (int j = (0); j < (2); ++j) response[i][j] = ask(query, i, j);
  sol.resize(n, 1e9 + 1);
  for (int i = (0); i < (n); ++i)
    for (int j = (0); j < (query); ++j) {
      int which = 1 - ((i & (1 << j)) > 0);
      sol[i] = min(sol[i], response[j][which][i]);
    }
  printf("-1\n");
  for (int i = (0); i < ((int)(sol.size()) - 1); ++i) printf("%d ", sol[i]);
  printf("%d\n", sol.back());
  fflush(stdout);
  return 0;
}
