#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long query(long long a, long long b) {
  cout << "? " << a << " " << b << endl;
  long long ret;
  cin >> ret;
  return ret;
}
void print(vector<long long> &ans) {
  cout << "! ";
  for (auto x : ans) cout << x << " ";
  cout << endl;
}
void solve() {
  long long n;
  cin >> n;
  vector<long long> ans(n);
  long long cur = 1;
  for (long long i = 2; i <= n; i++) {
    long long a = query(cur, i);
    long long b = query(i, cur);
    if (a > b) {
      ans[cur - 1] = a;
      cur = i;
    } else
      ans[i - 1] = b;
  }
  ans[cur - 1] = n;
  print(ans);
}
int32_t main() {
  long long t = 1;
  while (t--) solve();
  return 0;
}
