#include <bits/stdc++.h>
using namespace std;
int n;
int a[10005];
int main() {
  cin >> n;
  int l = 1, r = n;
  for (int i = 0; i < n - 1; i++) {
    cout << "? " << l << " " << r << endl;
    cout.flush();
    int c1;
    cin >> c1;
    cout << "? " << r << " " << l << endl;
    cout.flush();
    int c2;
    cin >> c2;
    if (c1 > c2) {
      a[l] = c1;
      l++;
    } else {
      a[r] = c2;
      r--;
    }
  }
  a[l] = n;
  cout << "! ";
  for (int i = 1; i <= n; i++) {
    cout << a[i] << " ";
  }
  cout.flush();
  return 0;
}
