#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  map<long long, long long> m;
  set<long long> s;
  long long l = 1;
  long long r = n;
  for (long long i = 1; i < n; i++) {
    cout << "? " << l << " " << r << endl;
    long long y1;
    cin >> y1;
    cout << "? " << r << " " << l << endl;
    long long y2;
    cin >> y2;
    if (y1 > y2) {
      m[l] = y1;
      s.insert(y1);
      l++;
    } else {
      m[r] = y2;
      s.insert(y2);
      r--;
    }
  }
  long long last = -1;
  for (long long i = 1; i <= n; i++) {
    if (s.find(i) == s.end()) {
      last = i;
      break;
    }
  }
  cout << "! ";
  for (long long i = 1; i <= n; i++) {
    if (m.find(i) != m.end()) {
      cout << m[i] << " ";
    } else
      cout << last << " ";
  }
}
