#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
int change[N];
long long query(vector<int>& a) {
  printf("? ");
  printf("%d", a.size());
  for (auto it : a) printf(" %d", it);
  printf("\n\n");
  long long x;
  cin >> x;
  return x;
}
int n;
vector<long long> ans(N);
int get_num(int x) {
  int res = 0;
  for (int i = 0; i < 13; i++)
    if (x >> i & 1) res++;
  return res;
}
int main() {
  vector<vector<int>> bit(14);
  scanf("%d", &n);
  int k = 0;
  for (int i = (1 << 6); i < (1 << 13); i++) {
    if (get_num(i) != 6) continue;
    for (int j = 0; j < 13; j++)
      if (!(i >> j & 1)) bit[j].push_back(k + 1);
    change[k++] = i;
    if (k == n) break;
  }
  vector<long long> dp(14);
  for (int i = 0; i < 13; i++) {
    if (bit[i].size()) dp[i] = query(bit[i]);
  }
  for (int i = 0; i < n; i++) {
    int j = change[i];
    for (int k = 0; k < 13; k++)
      if (j >> k & 1) ans[i] |= dp[k];
  }
  printf("!");
  for (int i = 0; i < n; i++) printf(" %lld", ans[i]);
  printf("\n");
  return 0;
}
