#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
#ifdef LOCAL
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
#endif
auto ask = [&](vector<int> &v) {
#ifdef LOCAL
set<int> s;
for (auto i : v) {
s.insert(a[i]);
}
return (int)s.size();
#endif
cout << v.size() << '\n';
for (auto x : v) {
cout << x + 1 << ' ';
}
cout << endl;
int ret;
cin >> ret;
return ret;
};
vector<int> ans(n, -1);
int c = 1;
for (int i = 0; i < n; i++) {
if (ans[i] != -1) {
continue;
}
ans[i] = c;
for (int j = i + 1; j < n; j++) {
vector<int> s = {i, j};
if (ask(s) == 1) {
ans[j] = c;
}
}
c++;
}
for (int i = 0; i < n; i++) {
cout << ans[i] << ' ';
}
cout << '\n';
return 0;
}