#include <bits/stdc++.h>
#pragma GCC optimize("O3,inline,unroll-loops")
using namespace std;
long long Query(vector<int> v) {
  int i;
  long long o;
  if (v.empty()) return 0;
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
  cout << "? " << v.size();
  for (i = 0; i < (signed)v.size(); i++) cout << ' ' << v[i] + 1;
  cout << endl;
  cout.flush();
  cin >> o;
  return o;
}
int main(void) {
  int n;
  int i, j, c;
  vector<int> v[13];
  long long s[13], o;
  cin >> n;
  for (i = c = 0; i < (1 << 13) && c < n; i++)
    if (__builtin_popcount(i) == 13 / 2) {
      for (j = 0; j < 13; j++)
        if (i & (1 << j)) v[j].push_back(c);
      c++;
    }
  for (i = 0; i < 13; i++) s[i] = Query(v[i]);
  cout << '!';
  for (i = 0; i < n; i++) {
    for (j = o = 0; j < 13; j++)
      if (find(v[j].begin(), v[j].end(), i) == v[j].end()) o |= s[j];
    cout << ' ' << o;
  }
  cout << endl;
  return 0;
}
