#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, K1, K2;
  cin >> N;
  int L = 1, R = N, ans[N + 1];
  bool picked[N + 1];
  memset(picked, 0, sizeof(picked));
  while (L < R) {
    cout << "? " << L << ' ' << R << endl;
    cin >> K1;
    cout << "? " << R << ' ' << L << endl;
    cin >> K2;
    if (K1 > K2) {
      ans[L] = K1;
      picked[K1] = 1;
      L++;
    } else {
      ans[R] = K2;
      picked[K2] = 1;
      R--;
    }
  }
  if (K1 > K2) {
    for (int i = 1; i <= N; i++)
      if (!picked[i]) {
        ans[L] = i;
        break;
      }
  } else {
    for (int i = 1; i <= N; i++)
      if (!picked[i]) {
        ans[R] = i;
        break;
      }
  }
  cout << '!';
  for (int i = 1; i <= N; i++) cout << ' ' << ans[i];
  cout << endl;
}
