#include <bits/stdc++.h>
using namespace std;
const int N = 10005;
long long int askandans(int a, int b) {
  cout << "? " << a << " " << b << endl;
  long long int num;
  cin >> num;
  return num;
}
int main() {
  int n, com, a[N] = {0};
  cin >> n;
  com = 1;
  for (int i = 2; i <= n; ++i) {
    int l = askandans(com, i), r = askandans(i, com);
    if (l < r) {
      a[i] = r;
    } else {
      a[com] = l;
      com = i;
    }
  }
  a[com] = n;
  cout << "!";
  for (int i = 1; i <= n; ++i) {
    cout << " " << a[i];
  }
  cout << endl;
  return 0;
}
