#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long n;
  cin >> n;
  long long ans[n + 1];
  for (long long i = 0; i <= n; i++) ans[i] = 0;
  long long left = 1;
  long long right = n;
  while (left < right) {
    long long temp1, temp2;
    cout << "? " << left << " " << right << "\n";
    fflush(stdout);
    cin >> temp1;
    cout << "? " << right << " " << left << "\n";
    fflush(stdout);
    cin >> temp2;
    if (temp1 > temp2) {
      ans[left] = temp1;
      left++;
    } else {
      ans[right] = temp2;
      right--;
    }
  }
  for (long long i = 1; i <= n; i++) {
    if (ans[i] == 0) {
      ans[i] = n;
      break;
    }
  }
  cout << "! ";
  fflush(stdout);
  for (long long i = 1; i <= n; i++) {
    cout << ans[i] << " ";
    fflush(stdout);
  }
}
