#include <bits/stdc++.h>
using namespace std;
const int N = 2050, M = 15;
int b[N];
int rem = 4269;
int ask(int i, int j) {
  assert(rem != 0);
  --rem;
  cout << "? " << i + 1 << " " << j + 1 << endl;
  int x;
  cin >> x;
  assert(x != -1);
  return x;
}
inline int getBit(int x, int p) { return (x >> p) & 1; }
int checker[M];
int find(int p) {
  int res = 0;
  for (int i = 0; i < 12; i++) {
    if (p != checker[i] && getBit(ask(p, checker[i]), i)) {
      res |= 1 << i;
    }
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  srand(time(0));
  int n;
  cin >> n;
  for (int i = 0; i < 12; i++) {
    while (true) {
      int a = -1, b = -1;
      while (a == b) {
        a = rand() % n;
        b = rand() % n;
      }
      if (getBit(ask(a, b), i) == 0) {
        checker[i] = a;
        break;
      }
    }
  }
  int cur = 0, val = find(cur);
  for (int i = 1; val != 0 && i < n; i++) {
    if (ask(cur, i) == val) {
      cur = i;
      val = find(cur);
    }
  }
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    if (i != cur) {
      ans.push_back(ask(cur, i));
    } else {
      ans.push_back(0);
    }
  }
  cout << "! ";
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " \n"[i == n - 1];
  }
  return 0;
}
