#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = (int)2e9 + 7;
const long long LINF = (long long)4e18;
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;
}
string nextString(bool flag = false) {
  char ch;
  string ans = "";
  do {
    ch = getchar();
  } while (ch <= ' ');
  while (1) {
    ans += ch;
    ch = getchar();
    if (!flag) {
      if (ch <= ' ') break;
    } else {
      if (ch < ' ') break;
    }
  }
  return ans;
}
char nextChar() {
  char ch;
  do {
    ch = getchar();
  } while (ch <= ' ');
  return ch;
}
void read(string& s) { s = nextString(); }
void read(char& c) { c = nextChar(); }
template <typename T>
void read(T& a) {
  a = input<T>();
}
template <typename T, typename... R>
void read(T& a, R&... r) {
  read(a);
  read(r...);
}
int n;
const int N = 1e3 + 10;
int ans[N];
int32_t main() {
  srand(time(0));
  cin >> n;
  for (int i = 0; i <= n; ++i) {
    ans[i] = INF;
  }
  queue<pair<int, int> > q;
  q.push({1, n});
  while (!q.empty()) {
    vector<pair<int, int> > ask1;
    vector<pair<int, int> > ask2;
    while (!q.empty()) {
      int l = q.front().first, r = q.front().second;
      q.pop();
      int m = (l + r) / 2;
      ask1.push_back({l, m});
      ask2.push_back({m + 1, r});
    }
    vector<int> fAsk1;
    vector<int> fAsk2;
    for (auto i : ask1) {
      for (int j = i.first; j <= i.second; ++j) {
        fAsk1.push_back(j);
      }
    }
    for (auto i : ask2) {
      for (int j = i.first; j <= i.second; ++j) {
        fAsk2.push_back(j);
      }
    }
    cout << fAsk1.size() << endl;
    for (auto i : fAsk1) cout << i << " ";
    cout << endl;
    vector<int> rep1(n);
    for (auto& i : rep1) cin >> i;
    cout << fAsk2.size() << endl;
    for (auto i : fAsk2) cout << i << " ";
    cout << endl;
    vector<int> rep2(n);
    for (auto& i : rep2) cin >> i;
    vector<bool> ok1(n + 1, false);
    vector<bool> ok2(n + 1, false);
    for (auto i : fAsk1) {
      ok2[i] = true;
    }
    for (auto i : fAsk2) {
      ok1[i] = true;
    }
    for (int i = 1; i <= n; ++i) {
      if (ok1[i])
        if (0) cerr << 1;
      if (ok2[i])
        if (0) cerr << 2;
      if (0) cerr << " ";
    }
    if (0) cerr << endl;
    for (int i = 1; i <= n; ++i) {
      if (ok1[i] == true) {
        ans[i] = min(ans[i], rep1[i - 1]);
      }
      if (ok2[i] == true) {
        ans[i] = min(ans[i], rep2[i - 1]);
      }
    }
    for (int i = 1; i <= n; ++i) {
      if (0) cerr << ans[i] << " ";
    }
    if (0) cerr << endl;
    if (0) cerr << endl;
    vector<pair<int, int> > nQ;
    for (auto i : ask1) {
      if (i.first != i.second) nQ.push_back({i.first, i.second});
    }
    for (auto i : ask2) {
      if (i.first != i.second) nQ.push_back({i.first, i.second});
    }
    sort(nQ.begin(), nQ.end());
    for (auto i : nQ) q.push({i.first, i.second});
  }
  cout << -1 << endl;
  for (int i = 1; i <= n; ++i) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
