#include <bits/stdc++.h>
using namespace std;
unsigned long long read() {
  unsigned long long x = 0, pos = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') pos = 0;
  for (; isdigit(ch); ch = getchar()) x = (x << 1) + (x << 3) + ch - '0';
  return pos ? x : -x;
}
const int N = (1 << 16) + 400;
unsigned long long pos[N], tp = 0;
unsigned long long cx = 0, tmp[N];
unsigned long long ans[30];
int main() {
  int n = read();
  unsigned long long s = (1 << 13) - 1;
  for (unsigned long long i = 1; i <= s; i++) {
    unsigned long long cnt = 0;
    for (unsigned long long j = 1; j <= 13; j++) {
      if ((1 << (j - 1)) & i) {
        cnt++;
      }
    }
    if (cnt == 6) {
      pos[++tp] = i;
      if (tp == n) break;
    }
  }
  for (unsigned long long i = 1; i <= 13; i++) {
    cx = 0;
    for (unsigned long long j = 1; j <= n; j++) {
      if (pos[j] & (1 << (i - 1))) {
        cx++;
        tmp[cx] = j;
      }
    }
    if (!cx) continue;
    printf("? %llu ", cx);
    for (unsigned long long j = 1; j <= cx; j++) printf("%llu ", tmp[j]);
    fflush(stdout);
    ans[i] = read();
  }
  printf("! ");
  for (unsigned long long i = 1; i <= n; i++) {
    unsigned long long a = 0;
    for (unsigned long long j = 1; j <= 13; j++) {
      if (!(pos[i] & (1 << (j - 1)))) {
        a |= ans[j];
      }
    }
    printf("%llu ", a);
  }
  fflush(stdout);
  return 0;
}
