#include <bits/stdc++.h>
using namespace std;
int ask(int i, int j) {
  cout << "? " << i << " " << j << endl;
  fflush(stdout);
  int val;
  cin >> val;
  return val;
}
int main() {
  int n;
  cin >> n;
  int a[n + 1];
  int index = 1, i, x, y;
  for (int i = 2; i <= n; i++) {
    x = ask(index, i);
    y = ask(i, index);
    if (x > y) {
      a[index] = x;
      index = i;
    } else if (y > x) {
      a[i] = y;
    }
  }
  a[index] = n;
  cout << "! ";
  for (i = 1; i <= n; i++) cout << a[i] << " ";
  cout << "\n";
  fflush(stdout);
  return 0;
}
