#include <bits/stdc++.h>
using namespace std;
void oj() {}
void solve() {
  long long n;
  cin >> n;
  vector<long long> ans(n + 1, 0);
  long long i = 1, j = n, sum = 0;
  while (i < j) {
    long long a, b;
    cout << "?"
         << " " << i << " " << j << endl;
    cin >> a;
    cout << "?"
         << " " << j << " " << i << endl;
    cin >> b;
    if (a > b) {
      ans[i] = a;
      i++;
      sum += a;
    } else {
      ans[j] = b;
      j--;
      sum += b;
    }
  }
  cout << "! ";
  for (long long i = 1; i <= n; i++)
    if (ans[i] != 0)
      cout << ans[i] << " ";
    else
      cout << n * (n + 1) / 2 - sum << " ";
  cout << endl;
}
signed main() {
  oj();
  ios::sync_with_stdio(0);
  cin.tie(0);
  ;
  solve();
  return 0;
}
