#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  vector<long long int> a(n + 1);
  long long int c, b;
  long long int sum = 0;
  while (sum < n - 1) {
    for (long long int i = 1; i <= n; i++) {
      while (i <= n && a[i] != 0) {
        i++;
      }
      c = i;
      i++;
      while (i <= n && a[i] != 0) {
        i++;
      }
      b = i;
      if (c == n + 1 or b == n + 1) break;
      long long int x = -1, y = -1, z;
      for (long long int j = 1; j <= 2; j++) {
        if (j == 1) {
          cout << '?' << " " << c << " " << b << "\n";
        }
        if (j == 2) {
          cout << '?' << " " << b << " " << c << "\n";
        }
        cin >> z;
        if (z > x) {
          x = z;
          if (j == 1)
            y = c;
          else
            y = b;
        }
      }
      a[y] = x;
      sum++;
    }
  }
  cout << "! ";
  for (long long int i = 1; i <= n; i++) {
    if (a[i] == 0) a[i] = n;
    cout << a[i] << " ";
  }
  cout << "\n";
}
