#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 6;
const long long MOD = 1e9 + 7;
vector<int> vc;
vector<int> g[N];
long long ans[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ;
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  for (int msk = 0; msk < ((1 << 13)); ++msk) {
    if (__builtin_popcount(msk) == 6) {
      vc.push_back(msk);
    }
  }
  int n;
  cin >> n;
  for (int i = 0; i < (13); ++i) {
    vector<int> tv;
    for (int j = (1); j <= (n); ++j) {
      if (vc[j] & (1 << i)) {
        tv.push_back(j);
      } else {
        g[j].push_back(i);
      }
    }
    if (tv.size()) {
      cout << "? " << tv.size() << " ";
      for (int j = 0; j < (tv.size()); ++j) cout << tv[j] << " ";
      cout << endl;
      cin >> ans[i];
    }
  }
  cout << "! ";
  for (int i = (1); i <= (n); ++i) {
    long long pat = 0;
    for (auto to : g[i]) {
      pat |= ans[to];
    }
    cout << pat << " ";
  }
  cout << endl;
  return 0;
}
