#include <bits/stdc++.h>
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,abm,mmx,avx,avx2,popcnt,tune=native")
using namespace std;
const long double EPS = 1e-4;
const long double EPS2 = 1e-12;
const long double PI = acos(-1);
int mod = (int)998244353;
const int MOD7 = 1000000007;
const int MOD9 = 1000000009;
const int a228 = 18;
const long long INF = 1e18;
const int inf = 1e9;
mt19937 rnd(time(0));
const long long kekmod = 1791791791;
const long long bestmod = 1148822869;
int mem[2049][2049];
int ask(int i, int j) {
  if (mem[i][j] || mem[j][i]) return mem[i][j] | mem[j][i];
  cout << "? " << i + 1 << ' ' << j + 1 << endl;
  int x;
  cin >> x;
  mem[i][j] = x;
  return x;
}
int n;
const int gag = 17;
int guess(int pos) {
  vector<int> ors;
  for (int i = 0; i < gag; ++i) {
    int x = rnd() % n;
    if (x == pos) {
      i--;
      continue;
    }
    ors.push_back(ask(pos, x));
  }
  int elem = 0;
  for (int bt = 12; bt >= 0; --bt) {
    bool f = 1;
    for (int i : ors) {
      if (!(i & (1 << bt))) f = 0;
    }
    if (f) elem |= (1 << bt);
  }
  return elem;
}
const int gue = (4296 - 4096) / gag;
signed main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  srand(time(NULL));
  cin >> n;
  vector<int> a(n, -1);
  int kek = 0;
  int el = guess(0);
  a[0] = el;
  for (int i = 1; i < n; ++i) {
    if ((ask(i, kek) | el) == el) {
      kek = i;
      int tel = el;
      el = guess(i);
      if (el == tel) assert(0);
      a[i] = el;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (a[i] == -1) {
      int x = ask(kek, i);
      a[i] = x;
    }
  }
  cout << "! ";
  for (int i = 0; i < a.size(); ++i) cout << a[i] << ' ';
  ;
  cout << endl;
}
