#include <bits/stdc++.h>
using namespace std;
void deba(int* a, int n) {
  cerr << "| ";
  for (int i = 0; i < (n); i++) cerr << a[i] << " ";
  cerr << "|" << endl;
}
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
const int INF = 1 << 30;
int mn[1024];
int val[1024];
int main() {
  ios::sync_with_stdio(false);
  int k = 1024;
  int h = k;
  int n;
  cin >> n;
  for (int i = 0; i < (1024); i++) mn[i] = 1000000009;
  while (1) {
    h = h / 2;
    if (h == 0) break;
    vector<int> f, s;
    int c = 1;
    while (1) {
      for (int i = 0; i < (h); i++) {
        if (c <= n) f.push_back(c);
        c++;
      }
      for (int i = 0; i < (h); i++) {
        if (c <= n) s.push_back(c);
        c++;
      }
      if (c >= k) break;
    }
    if (f.size() > 0 && s.size() > 0) {
      cout << f.size() << endl;
      for (int i = 0; i < (f.size()); i++) cout << f[i] << " ";
      cout << endl;
      for (int i = (1); i <= (n); i++) {
        cin >> val[i];
      }
      for (int i = 0; i < (s.size()); i++) mn[s[i]] = min(mn[s[i]], val[s[i]]);
    }
    if (s.size() > 0 && f.size() > 0) {
      cout << s.size() << endl;
      for (int i = 0; i < (s.size()); i++) cout << s[i] << " ";
      cout << endl;
      for (int i = (1); i <= (n); i++) {
        cin >> val[i];
      }
      for (int i = 0; i < (f.size()); i++) mn[f[i]] = min(mn[f[i]], val[f[i]]);
    }
  }
  cout << -1 << endl;
  for (int i = (1); i <= (n); i++) cout << mn[i] << " ";
  cout << endl;
  return 0;
}
