#include <bits/stdc++.h>
using namespace std;
bool dbg = 0;
void bad(string mes = "Impossible") {
  cout << mes;
  exit(0);
}
template <typename T>
string bin(T x, int st = 2) {
  string ans = "";
  while (x > 0) {
    ans += char('0' + x % st);
    x /= st;
  }
  reverse(ans.begin(), ans.end());
  return ans.empty() ? "0" : ans;
}
template <typename T>
T input() {
  T ans = 0, m = 1;
  char c = ' ';
  while (!((c >= '0' && c <= '9') || c == '-')) {
    c = getchar();
  }
  if (c == '-') m = -1, c = getchar();
  while (c >= '0' && c <= '9') {
    ans = ans * 10 + (c - '0'), c = getchar();
  }
  return ans * m;
}
template <typename T>
void read(T& a) {
  a = input<T>();
}
template <typename T>
void read(T& a, T& b) {
  read(a), read(b);
}
template <typename T>
void read(T& a, T& b, T& c) {
  read(a, b), read(c);
}
template <typename T>
void read(T& a, T& b, T& c, T& d) {
  read(a, b), read(c, d);
}
void reads(string& second) {
  string ans = "";
  char c = '\n';
  while (c == '\n' || c == ' ') c = getchar();
  while (c != '\n' && c != ' ' && c) ans += c, c = getchar();
  second = ans;
}
const int inf = 2e9;
const long double eps = 1e-12;
const int maxn = 1e3 + 44, base = 1e9 + 7;
const long long llinf = 4e18 + 5;
template <typename T>
T binpow(T n, T second) {
  if (second <= 0) return 1LL;
  if (second % 2 == 0) {
    T b = binpow(n, second / 2);
    return (1LL * b * b) % base;
  } else {
    return (1LL * binpow(n, second - 1) * n) % base;
  }
}
int ans[maxn];
int used1[maxn], used2[maxn];
int main() {
  int n;
  cin >> n;
  vector<pair<int, pair<int, int> > > old, newQ;
  vector<int> to_ask1, to_ask2;
  int realN = n;
  while (n & (n - 1)) n++;
  old.push_back(make_pair(1, make_pair(1, n)));
  memset(ans, 63, sizeof(ans));
  while (!old.empty()) {
    to_ask1.clear();
    to_ask2.clear();
    memset(used1, 0, sizeof(used1));
    memset(used2, 0, sizeof(used2));
    for (auto mda : old) {
      int x = mda.first, y = mda.second.first, len = mda.second.second;
      if (len == 1) continue;
      int tm = (x + x + len - 1) / 2;
      for (int i = x; i <= tm; i++) {
        to_ask1.push_back(i);
        used1[i] = 1;
      }
      for (int i = tm + 1; i <= x + len - 1; i++) {
        to_ask2.push_back(i);
        used2[i] = 1;
      }
      newQ.push_back(make_pair(x, make_pair(y, len / 2)));
      newQ.push_back(make_pair(x + len / 2, make_pair(y + len / 2, len / 2)));
    }
    old = newQ;
    newQ.clear();
    while (!to_ask1.empty() && to_ask1.back() > realN) to_ask1.pop_back();
    if (!to_ask1.empty()) {
      cout << to_ask1.size() << '\n';
      for (int i : to_ask1) cout << i << ' ';
      cout << '\n';
      cout.flush();
      for (int i = 1; i <= realN; i++) {
        int x;
        scanf("%d", &x);
        if (!used1[i]) ans[i] = min(ans[i], x);
      }
    }
    while (!to_ask2.empty() && to_ask2.back() > realN) to_ask2.pop_back();
    if (!to_ask2.empty()) {
      cout << to_ask2.size() << '\n';
      for (int i : to_ask2) cout << i << ' ';
      cout << '\n';
      cout.flush();
      for (int i = 1; i <= realN; i++) {
        int x;
        scanf("%d", &x);
        if (!used2[i]) ans[i] = min(ans[i], x);
      }
    }
  }
  cout << -1 << '\n';
  for (int i = 1; i <= realN; i++) cout << ans[i] << ' ';
  return 0;
}
