#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e9 + 5;
vector<int> mask;
long long ans[13];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < (1 << 13); i++) {
    int cnt = 0;
    for (int j = 0; j < 13; j++) {
      if (i & (1 << j)) cnt++;
    }
    if (cnt == 6) mask.push_back(i);
  }
  for (int i = 0; i < 13; i++) {
    vector<int> v;
    for (int j = 0; j < n; j++) {
      if (mask[j] & (1 << i)) v.push_back(j + 1);
    }
    if (v.size()) {
      cout << "? " << v.size();
      for (int j = 0; j < v.size(); j++) {
        cout << " " << v[j];
      }
      cout << endl;
      cin >> ans[i];
    } else
      ans[i] = 0;
  }
  cout << "! ";
  for (int i = 0; i < n; i++) {
    long long first = 0;
    for (int j = 0; j < 13; j++) {
      if ((mask[i] & (1 << j)) == 0) {
        first |= ans[j];
      }
    }
    cout << first << " ";
  }
  cout << endl;
  return 0;
}
