#include <bits/stdc++.h>
int n;
std::vector<int> qry[15];
long long int ans[15];
inline int countbit(int x) {
  int ret = 0;
  while (x) {
    ++ret;
    x &= x - 1;
  }
  return ret;
}
int main() {
  std::cin >> n;
  int upc = 1 << 13;
  for (int i = 1, j = 0; i < upc; ++i)
    if (countbit(i) == 6) {
      ++j;
      for (int t = 0, q = 1 << t; t < 13; q = 1 << ++t)
        if (i & q) {
          qry[t].push_back(j);
        }
      if (j == n) break;
    }
  for (int i = 0; i < 13; ++i)
    if (qry[i].size()) {
      std::cout << "? " << qry[i].size();
      for (auto u : qry[i]) {
        std::cout << ' ' << u;
      }
      std::cout << std::endl;
      std::cin >> ans[i];
    }
  std::cout << '!';
  for (int i = 1; i <= n; ++i) {
    long long int t = 0;
    for (int j = 0; j < 13; ++j) {
      bool flg = true;
      for (auto u : qry[j])
        if (u == i) {
          flg = false;
          break;
        }
      if (flg) t |= ans[j];
    }
    std::cout << ' ' << t;
  }
  std::cout << std::endl;
  return 0;
}
