#include <bits/stdc++.h>
const long double PI = acos(-1.0);
using namespace std;
int setb(int n, int pos) { return n = n | (1 << pos); }
int resb(int n, int pos) { return n = n & ~(1 << pos); }
bool checkb(int n, int pos) { return (bool)(n & (1 << pos)); }
inline long long bigmod(long long b, long long p, long long m) {
  long long ret = 1, cur = b % m;
  while (p) {
    if (p & 1) ret = (ret * cur) % m;
    cur = (cur * cur) % m;
    p = p >> 1;
  }
  return ret;
}
int n;
vector<int> v[15];
int cnt[1005];
bool generate_fuck() {
  int cur = 0;
  for (int mask = 0; mask < (1 << 13); mask++) {
    if (__builtin_popcount(mask) == 6) {
      cur++;
      for (int i = 0; i < 13; i++)
        if (checkb(mask, i)) v[i + 1].push_back(cur);
    }
    if (cur == n) break;
  }
  return true;
}
void gen() {
  while (1) {
    bool f = generate_fuck();
    if (f) break;
  }
}
long long ask(int k) {
  if (v[k].size() == 0) return 0;
  printf("? %d", v[k].size());
  for (int i = 0; i < v[k].size(); i++) printf(" %d", v[k][i]);
  puts("");
  fflush(stdout);
  long long x;
  scanf("%lld", &x);
  return x;
}
long long ans[15];
bool isthere(int idx, int k) {
  for (int i = 0; i < v[k].size(); i++)
    if (v[k][i] == idx) return true;
  return false;
}
long long go(int idx) {
  long long ret = 0;
  for (int k = 1; k <= 13; k++) {
    if (isthere(idx, k) == false) ret |= ans[k];
  }
  return ret;
}
void solve() {
  scanf("%d", &n);
  gen();
  for (int k = 1; k <= 13; k++) ans[k] = ask(k);
  printf("!");
  for (int i = 1; i <= n; i++) {
    long long x = go(i);
    printf(" %lld", x);
  }
  puts("");
  fflush(stdout);
}
int main() {
  solve();
  return 0;
}
