#include <bits/stdc++.h>
using namespace std;
void faltu() {}
const long long N = 0;
long long query(long long a, long long b) {
  cout << "? " << a << " " << b << endl;
  long long x;
  cin >> x;
  return x;
}
void ans(long long r) { cout << "! " << r << endl; }
void solve() {
  long long n;
  cin >> n;
  long long cur = 1;
  long long ans[n + 1];
  for (long long i = 2; i < n + 1; i++) {
    long long k = query(cur, i);
    long long l = query(i, cur);
    if (l < k) {
      ans[cur] = k;
      cur = i;
    } else
      ans[i] = l;
  }
  ans[cur] = n;
  cout << "! ";
  for (long long i = 1; i < n + 1; i++) cout << ans[i] << " ";
  cout << "\n";
}
signed main() {
  faltu();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  while (t--) {
    solve();
  }
}
