#include <bits/stdc++.h>
using namespace std;
struct rnxt {
  template <class T>
  operator T() {
    T t;
    cin >> t;
    return t;
  }
};
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int len = rnxt();
  vector<int> masks;
  for (int m = (1 << 7) - 1; m < (1 << 13); ++m) {
    if (__builtin_popcount(m) == 7) {
      masks.push_back(m);
    }
    if (masks.size() == len) {
      break;
    }
  }
  vector<vector<int>> queries(13);
  for (int i = 0; i < len; ++i) {
    for (int b = 0; b < 13; ++b) {
      if (((1 << b) & masks[i]) != 0) {
        queries[b].push_back(i);
      }
    }
  }
  vector<int64_t> ans(13, 0);
  for (int q = 0; q < 13; ++q) {
    if (not queries[q].empty()) {
      cout << "? " << queries[q].size();
      for (auto&& e : queries[q]) {
        cout << ' ' << e + 1;
      }
      cout << endl;
      cin >> ans[q];
    }
  }
  vector<int64_t> res(len, 0);
  for (int i = 0; i < len; ++i) {
    for (int b = 0; b < 13; ++b) {
      if (((1 << b) & masks[i]) == 0) {
        res[i] |= ans[b];
      }
    }
  }
  cout << "!";
  for (auto&& e : res) {
    cout << ' ' << e;
  }
  cout << endl;
  return 0;
}
