#include <bits/stdc++.h>
void err() { std::cout << std::endl; }
template <typename T, typename... Args>
void err(T a, Args... args) {
  std::cout << a << ' ';
  err(args...);
}
template <template <typename...> class T, typename t, typename... A>
void err(const T<t> &arg, const A &...args) {
  for (auto &v : arg) std::cout << v << ' ';
  err(args...);
}
using namespace std;
const int N = 1000 + 5, P = 13;
void run() {
  int n;
  cin >> n;
  vector<vector<int>> bit(P);
  vector<int> change(n);
  int k = 0;
  int j1 = 1 << 6;
  for (int i = j1; i < 1 << P; i++) {
    if (__builtin_popcount(i) != P / 2) continue;
    for (int j = 0; j < P; j++) {
      if (!(i >> j & 1)) {
        bit[j].push_back(k + 1);
      }
    }
    change[k++] = i;
    if (k == n) break;
  }
  auto query = [&](vector<int> &q) {
    cout << '?' << ' ' << (int)(q).size();
    for (auto it : q) {
      cout << ' ' << it;
    }
    cout << '\n' << endl;
    long long t;
    cin >> t;
    return t;
  };
  vector<long long> val(P);
  for (int i = 0; i < P; i++) {
    if ((int)(bit[i]).size()) {
      val[i] = query(bit[i]);
    }
  }
  vector<long long> A(n);
  for (int i = 0; i < n; i++) {
    int x = change[i];
    for (int j = 0; j < P; j++) {
      if (x >> j & 1) {
        A[i] |= val[j];
      }
    }
  }
  cout << "!";
  for (int i = 0; i < n; i++) {
    cout << ' ' << A[i];
  }
  cout << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(20);
  run();
  return 0;
}
