#include <bits/stdc++.h>
using namespace std;
int n, k;
int a[11] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024};
vector<int> x;
int b[1001], c[1001], d[1001];
bool f(int j, int i) {
  int xx = i / 2, yy = i % 2, zz = j;
  for (int k = 0; k < xx; k++) zz /= 2;
  zz = (zz & 1);
  if (zz == yy)
    return true;
  else
    return false;
}
int main() {
  cin >> n;
  for (int i = 0; i <= n; i++) d[i] = 1000000001;
  for (int i = 0; i <= 10; i++)
    if (n < a[i]) {
      k = i;
      break;
    }
  for (int i = 0; i < 2 * k; i++) {
    x.clear();
    for (int j = 1; j <= n; j++)
      if (f(j, i)) x.push_back(j);
    cout << x.size() << "\n";
    for (int j = 0; j < x.size(); j++) cout << x[j] << " ";
    cout << endl;
    for (int i = 0; i <= n; i++) b[i] = 0;
    for (int j = 0; j < x.size(); j++) b[x[j]] = 1;
    for (int j = 1; j <= n; j++) {
      cin >> c[j];
      if (!b[j]) d[j] = min(d[j], c[j]);
    }
  }
  cout << -1 << "\n";
  for (int i = 1; i <= n; i++) cout << d[i] << " ";
  cout << endl;
}
