#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
long long cnt, p[1005], a[14];
long long ct(long long x) {
  if (!x) return 0;
  return ct(x / 2) + (x & 1);
}
long long q[14][1005], l[14], ans[1005];
signed main() {
  long long n;
  scanf("%lld", &n);
  for (long long i = (1 << 5) - 1; i < 1 << 13; i++) {
    if (ct(i) == 5) {
      if (cnt < n) {
        p[++cnt] = i;
      } else
        break;
    }
  }
  for (long long i = 1; i <= n; i++) {
    for (long long j = 0; j < 13; j++) {
      if (p[i] & (1 << j)) q[j + 1][++l[j + 1]] = i;
    }
  }
  for (long long i = 1; i <= 13; i++) {
    if (!l[i]) break;
    printf("? %lld ", l[i]);
    for (long long j = 1; j <= l[i]; j++) printf("%lld ", q[i][j]);
    puts("");
    fflush(stdout);
    scanf("%lld", &a[i]);
  }
  for (long long i = 1; i <= n; i++) {
    for (long long j = 0; j < 13; j++) {
      if (!(p[i] & (1 << j))) {
        ans[i] |= a[j + 1];
      }
    }
  }
  printf("! ");
  for (long long i = 1; i <= n; i++) printf("%lld ", ans[i]);
  puts("");
  fflush(stdout);
  return 0;
}
