#include <bits/stdc++.h>
using namespace std;
const int N = 2100;
map<pair<int, int>, int> my;
bool u[N] = {0};
int a[N] = {0}, z[N] = {0}, to[N] = {0}, lg[N] = {0}, g = 0, n = 0;
int tol = 0;
int ask(int i, int j) {
  if (i > j) swap(i, j);
  int x = my[make_pair(i, j)];
  if (x) return x;
  tol++;
  if (tol > 4269) {
    while (1)
      ;
  }
  printf("? %d %d\n", a[i], a[j]);
  fflush(stdout);
  scanf("%d", &x);
  my[make_pair(i, j)] = x;
  return x;
}
void pri() {
  printf("!");
  int i = 0;
  for (i = 1; i <= n; i++) {
    printf(" %d", z[to[i]]);
  }
  printf("\n");
}
void solve() {
  mt19937 myrand(time(0));
  int x = 0, i = 0, j = 0, k = 0, mk = 0;
  mk = (1 << 11) - 1;
  scanf("%d", &n);
  if (n < 60) {
    for (i = 1; i <= n; i++) {
      a[i] = to[i] = i;
    }
    for (i = 1; i <= n; i++) {
      z[i] = mk;
      for (j = 1; j <= n; j++) {
        if (j != i) {
          z[i] &= ask(i, j);
        }
      }
    }
    pri();
    return;
  }
  for (i = 1; i <= n; i++) {
    a[i] = i;
  }
  shuffle(a + 1, a + n + 1, myrand);
  for (i = 1; i <= n; i++) {
    to[a[i]] = i;
  }
  memset(z, 0XFF, sizeof(z));
  for (i = 1; i <= n; i++) {
    z[i] = mk;
    for (k = 1; k <= 25; k++) {
      j = myrand() % n + 1;
      if (j == i) continue;
      x = ask(i, j);
      z[i] &= x;
    }
    for (j = 1; j < i; j++) {
      if (((z[i] ^ mk) | (z[j] ^ mk)) == mk) {
        break;
      }
    }
    if (j < i) {
      break;
    }
  }
  for (k = 1; k <= n; k++) {
    if (z[k] == -1) {
      z[k] = ask(i, k) & ask(j, k);
    }
    if (z[k] == 0) {
      break;
    }
  }
  for (j = k + 1; j <= n; j++) {
    if (z[j] == -1) {
      z[j] = ask(k, j);
    }
  }
  pri();
}
int main() {
  int o = 1;
  while (o--) {
    solve();
    fflush(stdout);
  }
  return 0;
}
