#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 5;
pair<vector<int>, vector<int>> v[N];
int ask(int x, int y) {
  cout << "? " << x + 1 << ' ' << y + 1 << '\n';
  int z;
  cin >> z;
  return z;
}
int main() {
  int n;
  cin >> n;
  int mx = 0, ans[n];
  for (int i = 1; i < n; ++i) {
    int a = ask(mx, i), b = ask(i, mx);
    if (a > b)
      ans[mx] = a, mx = i;
    else
      ans[i] = b;
  }
  ans[mx] = n;
  cout << "! ";
  for (int i = 0; i < n; ++i) cout << ans[i] << ' ';
  return 0;
}
