#include <bits/stdc++.h>
using namespace std;
int count_bits(int x) {
  int cnt = 0;
  while (x) {
    x = (x & (x - 1));
    cnt++;
  }
  return cnt;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int new_indices[n];
  vector<int> subsets[13];
  long long subset_ored_answer[13];
  int start = 0;
  for (int i = 0; i < (1 << 13) && start < n; i++) {
    if (count_bits(i) == 6) {
      new_indices[start] = i;
      start++;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 13; j++) {
      if (!((1 << j) & new_indices[i])) subsets[j].push_back(i + 1);
    }
  }
  for (int i = 0; i < 13; i++) {
    if (!subsets[i].empty()) {
      cout << "? " << subsets[i].size() << " ";
      for (int j = 0; j < subsets[i].size(); j++) cout << subsets[i][j] << " ";
      cout << endl;
      cin >> subset_ored_answer[i];
    } else
      subset_ored_answer[i] = 0;
  }
  cout << "! ";
  for (int i = 0; i < n; i++) {
    long long ans = 0;
    for (int j = 0; j < 13; j++)
      if (new_indices[i] & (1 << j)) ans = (ans | subset_ored_answer[j]);
    cout << ans << " ";
  }
  cout << endl;
}
