#include <bits/stdc++.h>
const int N = 1e3;
const int M = (1 << 14) - 1;
using namespace std;
int n, id[N + 5], cnt, c[N + 5], A[N + 5];
long long s[N + 5];
void query(long long &x) {
  printf("? %d ", cnt);
  for (int i = 1; i <= cnt; i++) printf("%d ", c[i]);
  printf("\n");
  fflush(stdout);
  scanf("%lld", &x);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i <= M; i++) {
    int sm = 0;
    for (int j = 1; j <= 13; j++)
      if ((i >> (j - 1)) & 1) sm++;
    if (sm == 6) id[++cnt] = i;
    if (cnt == n) break;
  }
  for (int i = 0; i < 13; i++) {
    cnt = 0;
    for (int j = 1; j <= n; j++)
      if ((id[j] >> i) & 1) c[++cnt] = j;
    if (!cnt) continue;
    query(s[i]);
  }
  printf("! ");
  for (int i = 1; i <= n; i++) {
    long long ans = 0;
    for (int j = 0; j < 13; j++)
      if (!((id[i] >> j) & 1)) ans |= s[j];
    printf("%lld ", ans);
  }
  fflush(stdout);
  return 0;
}
