#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
const double PI = acos(-1.0);
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long query(long long a, long long b) {
  cout << "? " << a << " " << b << endl;
  fflush(stdout);
  long long x;
  cin >> x;
  return x;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  long long pt = 1;
  long long ans[n + 1];
  for (long long i = 2; i <= n; i++) {
    long long x1 = query(pt, i);
    long long x2 = query(i, pt);
    if (x1 > x2) {
      ans[pt] = x1;
      pt = i;
    } else {
      ans[i] = x2;
    }
  }
  ans[pt] = n;
  cout << "! ";
  for (long long i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  fflush(stdout);
}
