#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 19;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  fflush(stdout);
  vector<int> ans(n, INF);
  vector<pair<int, int> > q(n, {0, n});
  vector<int> done(n, 0);
  bool ok = 1;
  vector<int> res(n, INF);
  int cnt = 0;
  while (ok) {
    ok = 0;
    set<int> w1;
    set<int> w2;
    for (int i = 0; i < n; i++) {
      if (done[i]) continue;
      int mid = (q[i].first + q[i].second) / 2;
      for (int j = q[i].first; j < mid; j++) w1.insert(j + 1);
      for (int j = mid; j < q[i].second; j++) w2.insert(j + 1);
    }
    vector<int> ans1(n);
    vector<int> ans2(n);
    cout << w1.size() << endl;
    fflush(stdout);
    for (auto x : w1) cout << x << " ";
    cout << endl;
    fflush(stdout);
    for (int i = 0; i < n; i++) {
      cin >> ans1[i];
    }
    fflush(stdout);
    cout << w2.size() << endl;
    for (auto x : w2) cout << x << " ";
    cout << endl;
    cnt += 2;
    fflush(stdout);
    for (int i = 0; i < n; i++) {
      cin >> ans2[i];
    }
    fflush(stdout);
    for (int i = 0; i < n; i++) {
      if (done[i]) continue;
      int mid = (q[i].first + q[i].second) / 2;
      if (i < mid) {
        if (ans[i] == ans2[i]) {
          res[i] = min(res[i], ans2[i]);
          done[i] = 1;
        } else if (ans[i] != INF) {
          q[i] = {q[i].first, mid};
          ans[i] = ans1[i];
          res[i] = min(res[i], ans2[i]);
        } else {
          if (ans2[i] <= ans1[i]) {
            ans[i] = ans2[i];
            res[i] = ans2[i];
            done[i] = 1;
          } else {
            ans[i] = ans1[i];
            res[i] = ans2[i];
            q[i].second = mid;
          }
        }
      } else {
        if (ans[i] == ans1[i]) {
          res[i] = min(res[i], ans1[i]);
          done[i] = 1;
        } else if (ans[i] != INF) {
          q[i] = {mid, q[i].second};
          ans[i] = ans2[i];
          res[i] = min(res[i], ans1[i]);
        } else {
          if (ans1[i] <= ans2[i]) {
            ans[i] = ans1[i];
            done[i] = 1;
            res[i] = ans1[i];
          } else {
            res[i] = ans1[i];
            ans[i] = ans2[i];
            q[i].first = mid;
          }
        }
      }
      if (q[i].first + 1 >= q[i].second) {
        done[i] = 1;
      }
    }
    for (int i = 0; i < n; i++)
      if (!done[i]) ok = 1;
  }
  fflush(stdout);
  cout << -1 << endl;
  fflush(stdout);
  for (int i = 0; i < n; i++) {
    cout << res[i] << " ";
  }
  fflush(stdout);
  return 0;
}
