#include <bits/stdc++.h>
using namespace std;
long long qry(vector<int> vec) {
  cout << "? " << (int)vec.size() << ' ';
  for (auto &k : vec) {
    cout << k << ' ';
  }
  cout << endl;
  long long ret;
  cin >> ret;
  return ret;
}
const int N = 13;
void solve() {
  int n;
  cin >> n;
  vector<vector<int> > subsets(N);
  vector<int> mapping(n + 1);
  int T = 1;
  for (int i = 0; i < (1 << N) && T <= n; i++) {
    if (__builtin_popcount(i) == 6) {
      mapping[T] = i;
      for (int j = 0; j < N; j++) {
        if (i >> j & 1) {
          subsets[j].push_back(T);
        }
      }
      T++;
    }
  }
  vector<long long> ans(N);
  for (int i = 0; i < N; i++) {
    if (subsets[i].size()) {
      ans[i] = qry(subsets[i]);
    }
  }
  cout << "! ";
  for (int i = 1; i <= n; i++) {
    long long out = 0;
    for (int j = 0; j < N; j++) {
      if (mapping[i] >> j & 1 ^ 1) {
        out |= ans[j];
      }
    }
    cout << out << ' ';
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
}
