#include <bits/stdc++.h>
using namespace std;
vector<int> V;
vector<int> q[13];
long long res[13];
long long ans[1024];
int main() {
  V.clear();
  for (int i = 0; i < (1 << 13); i++) {
    if (__builtin_popcount(i) == 6) {
      V.push_back(i);
    }
  }
  int n;
  while (~scanf("%d", &n)) {
    for (int i = 0; i < 13; i++) {
      q[i].clear();
      for (int j = 0; j < n; j++) {
        if ((V[j] >> i) & 1) q[i].push_back(j + 1);
      }
      if (q[i].size() > 0) {
        cout << "? " << q[i].size();
        for (int j = 0; j < q[i].size(); j++) cout << " " << q[i][j];
        cout << endl;
        cout.flush();
        scanf("%I64d", &res[i]);
      } else {
        res[i] = 0;
      }
    }
    for (int i = 0; i < n; i++) {
      ans[i] = 0;
      for (int j = 0; j < 13; j++) {
        if ((V[i] >> j) & 1) {
          continue;
        }
        ans[i] |= res[j];
      }
    }
    cout << "!";
    for (int i = 0; i < n; i++) {
      cout << " " << ans[i];
    }
    cout << endl;
    cout.flush();
  }
  return 0;
}
