#include <bits/stdc++.h>
using namespace std;
const int MaxLg = 25, inf = 1e9 + 100;
int n;
bool flag;
vector<int> out, mins[2][MaxLg];
void output() {
  if (flag)
    cout << -1 << '\n';
  else
    cout << out.size() << '\n';
  for (auto i : out) cout << i << ' ';
  cout << endl;
}
void input(int a, int b) {
  int tmp;
  for (int i = 0; i < n; ++i) {
    cin >> tmp;
    mins[a][b].push_back(tmp);
  }
}
void solve() {
  for (int i = 0; i < n; ++i) out.push_back(inf);
  for (int i = 0; (1 << i) <= n; ++i)
    for (int j = 1; j <= n; ++j)
      out[j - 1] = min(out[j - 1], mins[!(j & (1 << i))][i][j - 1]);
  flag = true;
}
int main() {
  cin >> n;
  for (int k = 0; k < 2; ++k)
    for (int i = 0; (1 << i) <= n; ++i) {
      for (int j = 1; j <= n; ++j)
        if ((j & (1 << i)) == k * (1 << i)) out.push_back(j);
      output();
      input(k, i);
      out.clear();
    }
  solve();
  output();
  return 0;
}
