#include <bits/stdc++.h>
using namespace std;
vector<long long> ask[13];
long long tans[13];
long long ASK(long long bit) {
  long long z = 0;
  if ((long long)ask[bit].size() == 0) return z;
  cout << "? ";
  cout << ask[bit].size() << " ";
  for (long long i = 0; i < (long long)ask[bit].size(); i++)
    cout << ask[bit][i] + 1 << " ";
  cout << endl;
  cin >> z;
  assert(z != -1);
  return z;
}
signed main() {
  long long n;
  cin >> n;
  vector<long long> masks(n);
  long long cur = 0;
  for (long long i = 0; i < (1 << 13); i++) {
    long long cnt = __builtin_popcount(i);
    if (cnt != 6) continue;
    masks[cur++] = i;
    if (cur == n) break;
  }
  for (long long i = 0; i < 13; i++) {
    for (long long j = 0; j < n; j++) {
      if (masks[j] >> i & 1) ask[i].push_back(j);
    }
  }
  for (long long i = 0; i < 13; i++) {
    tans[i] = ASK(i);
  }
  vector<long long> ans(n, 0);
  for (long long i = 0; i < n; i++) {
    long long msk = masks[i];
    for (long long j = 0; j < 13; j++) {
      if (!(msk >> j & 1)) {
        ans[i] = ans[i] | tans[j];
      }
    }
  }
  cout << "! ";
  for (long long i = 0; i < n; i++) cout << ans[i] << " ";
  cout << endl;
}
