#include <bits/stdc++.h>
using namespace std;
const int N = 1020;
const int INF = 1e9 + 100;
int n;
int ans[N];
vector<int> q(const vector<int>& qq) {
  cout << qq.size() << endl;
  for (int t : qq) cout << t << " ";
  cout << endl;
  vector<int> res(n);
  for (int& x : res) cin >> x;
  return res;
}
int main() {
  cin >> n;
  fill(ans, ans + N, INF);
  for (int bit = 1; bit < N; bit *= 2) {
    vector<int> a, b;
    for (int i = 1; i <= n; ++i) {
      if ((i & bit) == 0)
        a.push_back(i);
      else
        b.push_back(i);
    }
    if (a.size() == 0) continue;
    if (b.size() == 0) continue;
    auto aa = q(a);
    auto bb = q(b);
    for (int i = 1; i <= n; ++i) {
      if ((i & bit) == 0)
        ans[i] = min(ans[i], bb[i - 1]);
      else
        ans[i] = min(ans[i], aa[i - 1]);
    }
  }
  cout << -1 << endl;
  for (int i = 1; i <= n; ++i) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
