#include <bits/stdc++.h>
using namespace std;
int ask(int mx, int i) {
  cout << "? " << mx + 1 << " " << i + 1 << endl;
  int x;
  cin >> x;
  return x;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> v(n);
  int mx = 0;
  for (int i = 1; i < n; i++) {
    int a = ask(mx, i);
    int b = ask(i, mx);
    if (a > b) {
      v[mx] = a;
      mx = i;
    } else {
      v[i] = b;
    }
  }
  v[mx] = n;
  cout << "! ";
  for (auto e : v) cout << e << " ";
  cout << endl;
  return 0;
}
