#include <bits/stdc++.h>
using namespace std;
mt19937_64 mt(time(0));
const int MAXB = 13;
const int MAXN = 1234;
int code[MAXN];
long long ret[MAXB];
long long ask(const vector<int>& nums) {
  if (nums.empty()) return 0;
  cout << "? " << nums.size();
  for (int num : nums) {
    cout << ' ' << num;
  }
  cout << endl;
  long long val;
  cin >> val;
  return val;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(10);
  cout << fixed;
  int n;
  cin >> n;
  int cur = 0;
  for (int i = 1; i <= n; i++) {
    while (__builtin_popcount(cur) != 6) cur++;
    code[i] = cur++;
  }
  for (int i = 0; i < MAXB; i++) {
    int mask = 1 << i;
    vector<int> nums;
    for (int j = 1; j <= n; j++) {
      if (code[j] & mask) {
        nums.push_back(j);
      }
    }
    ret[i] = ask(nums);
  }
  cout << "!";
  for (int i = 1; i <= n; i++) {
    long long val = 0;
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      for (int k = 0; k < MAXB; k++) {
        int mask = 1 << k;
        if (mask & code[i]) continue;
        if (mask & code[j]) {
          val |= ret[k];
          break;
        }
      }
    }
    cout << ' ' << val;
  }
  cout << endl;
  return 0;
}
