#include <bits/stdc++.h>
inline long long rd() {
  long long _x = 0;
  int _ch = getchar(), _f = 1;
  for (; !isdigit(_ch) && (_ch != '-') && (_ch != EOF); _ch = getchar())
    ;
  if (_ch == '-') {
    _f = 0;
    _ch = getchar();
  }
  for (; isdigit(_ch); _ch = getchar()) _x = _x * 10 + _ch - '0';
  return _f ? _x : -_x;
}
void write(long long _x) {
  if (_x >= 10)
    write(_x / 10), putchar(_x % 10 + '0');
  else
    putchar(_x + '0');
}
inline void wrt(long long _x, char _p) {
  if (_x < 0) putchar('-'), _x = -_x;
  write(_x);
  if (_p) putchar(_p);
}
int Q = 13;
int n, cnt, to[1005];
std::vector<int> vt[13];
long long r[13];
int main() {
  n = rd();
  for (int i = 1; i < (1 << Q); i++)
    if (__builtin_popcount(i) == 6) {
      cnt++;
      to[cnt] = i;
      for (int j = 0; j < Q; j++)
        if (i & (1 << j)) {
          vt[j].push_back(cnt);
        }
      if (cnt == n) break;
    }
  for (int i = 0; i < 13; i++)
    if (vt[i].size()) {
      printf("? %d ", (int)vt[i].size());
      for (auto j : vt[i]) {
        printf("%d ", j);
      }
      printf("\n");
      fflush(stdout);
      r[i] = rd();
    }
  printf("! ");
  for (int i = 1; i <= n; i++) {
    long long res = 0;
    for (int j = 0; j < Q; j++)
      if (!(to[i] & (1 << j))) {
        res |= r[j];
      }
    printf("%lld ", res);
  }
  printf("\n");
  fflush(stdout);
}
