#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int z[11], p[(1 << 11) + 5];
int query(int i, int j) {
  cout << "? " << i << ' ' << j << '\n';
  cout.flush();
  int ans;
  cin >> ans;
  assert(ans != -1);
  return ans;
}
int get(int i) {
  int ans = (1 << 11) - 1;
  for (int b = 0; b < 11; b++) {
    if (z[b] != i)
      ans &= query(i, z[b]);
    else if (ans & (1 << b))
      ans ^= (1 << b);
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  memset(z, -1, sizeof(z));
  while (count(z, z + 11, -1)) {
    int i = uniform_int_distribution<int>(1, n)(rng),
        j = uniform_int_distribution<int>(1, n)(rng);
    if (i == j) continue;
    int tmp = query(i, j);
    for (int b = 0; b < 11; b++) {
      if (!(tmp & (1 << b))) z[b] = i;
    }
  }
  int idx = 1, val = get(1);
  for (int i = 2; i <= n; i++) {
    if (query(idx, i) == val) {
      idx = i;
      val = get(i);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (i != idx) p[i] = query(i, idx);
  }
  cout << "! ";
  for (int i = 1; i <= n; i++) cout << p[i] << ' ';
  cout.flush();
}
