#include <bits/stdc++.h>
using namespace std;
void setup() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int query(int a, int b) {
  cout << "? " << a + 1 << " " << b + 1 << "\n";
  cout.flush();
  int answer;
  cin >> answer;
  return answer;
}
int main() {
  setup();
  int N;
  cin >> N;
  int m = 0;
  vector<int> perm(N);
  for (int i = 1; i < N; i++) {
    int mi = query(m, i);
    int im = query(i, m);
    if (mi < im) {
      perm[i] = im;
    } else {
      perm[m] = mi;
      m = i;
    }
  }
  perm[m] = N;
  cout << "! ";
  for (int i : perm) cout << i << " ";
}
