#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k, l, ans, cot;
  int two[12], cnt[1010];
  int ha[1010][12];
  int val[1010][25];
  cin >> n;
  two[0] = 1;
  for (i = 1; i <= 10; i++) two[i] = two[i - 1] * 2;
  for (i = 1; i <= 10; i++)
    if (n < two[i]) {
      j = i;
      break;
    }
  memset(ha, 0, sizeof(ha));
  for (i = 1; i <= n; i++) {
    k = i;
    for (l = j - 1; l >= 0; l--) {
      ha[i][l] = k / two[l];
      k %= two[l];
    }
  }
  cot = 0;
  for (i = 0; i < j; i++) {
    ans = 0;
    for (k = 1; k <= n; k++)
      if (ha[k][i] == 0) {
        ans++;
        cnt[ans] = k;
      }
    cout << ans << endl;
    for (k = 1; k <= ans; k++) printf("%d ", cnt[k]);
    printf("\n");
    fflush(stdout);
    cot++;
    for (k = 1; k <= n; k++) scanf("%d", &val[k][cot]);
  }
  for (i = 0; i < j; i++) {
    ans = 0;
    for (k = 1; k <= n; k++)
      if (ha[k][i] == 1) {
        ans++;
        cnt[ans] = k;
      }
    cout << ans << endl;
    for (k = 1; k <= ans; k++) printf("%d ", cnt[k]);
    printf("\n");
    fflush(stdout);
    cot++;
    for (k = 1; k <= n; k++) scanf("%d", &val[k][cot]);
  }
  cout << -1 << endl;
  for (i = 1; i <= n; i++) sort(val[i] + 1, val[i] + 1 + 2 * j);
  for (i = 1; i <= n; i++) printf("%d ", val[i][j + 1]);
  printf("\n");
  fflush(stdout);
  return 0;
}
