#include <bits/stdc++.h>
using namespace std;
map<long long, long long> vis;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long T = 1;
  while (T--) {
    long long n;
    cin >> n;
    long long st = 1, en = n;
    long long a, b;
    long long ar[n + 2];
    long long sz = 0;
    while (st < en) {
      cout << "? " << st << " " << en << endl;
      cin >> a;
      cout << "? " << en << " " << st << endl;
      cin >> b;
      if (a < b) {
        ar[en] = b;
        en = en - 1;
        sz++;
      } else if (b < a) {
        ar[st] = a;
        st = st + 1;
        sz++;
      }
      if (sz == n) break;
    }
    long long num = -1;
    for (long long i = 1; i <= n; i++) vis[ar[i]] = 1;
    for (long long i = 1; i <= n; i++) {
      if (vis[i] == 0) {
        num = i;
        break;
      }
    }
    if (num != -1) ar[st] = num;
    cout << "! ";
    for (long long i = 1; i <= n; i++) cout << ar[i] << " ";
  }
}
