#include <bits/stdc++.h>
using namespace std;
int n_low(int x) {
  int count = 0;
  while (x > 0 && x % 2 == 0) {
    x /= 2;
    ++count;
  }
  return count;
}
int main() {
  assert(n_low(1) == 0);
  assert(n_low(2) == 1);
  assert(n_low(20) == 2);
  mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
  function<int(void)> get_n = [&]() -> int {
    int n;
    cin >> n;
    return n;
  };
  function<int(int, int)> query = [&](int i, int j) -> int {
    assert(i != j);
    cout << "? " << i + 1 << " " << j + 1 << endl;
    int v;
    cin >> v;
    return v;
  };
  const int n = get_n();
  int n_bits = 0;
  while (n > (1 << n_bits)) ++n_bits;
  vector<int> mask(n_bits);
  for (int bit = 0; bit < n_bits; ++bit) {
    while (true) {
      int a = rnd() % n;
      int b = rnd() % n;
      while (b == a) b = rnd() % n;
      if ((query(a, b) & (1 << bit)) == 0) {
        mask[bit] = a;
        break;
      }
    }
  }
  int zero = mask[0];
  int matched = 1;
  for (int i = 0; i < n; ++i) {
    if (i != zero && n_low(query(zero, i)) < matched) continue;
    for (int b = matched; b < n_bits; ++b) {
      if ((i != mask[b]) && (query(i, mask[b]) & (1 << b))) break;
      zero = i;
      ++matched;
    }
    if (matched == n_bits) break;
  }
  vector<int> b(n);
  for (int i = 0; i < n; ++i) {
    if (i == zero) {
      b[i] = 0;
    } else {
      b[i] = query(zero, i);
    }
  }
  cout << "! ";
  for (int v : b) cout << v << " ";
  cout << "\n";
  return 0;
}
