#include <bits/stdc++.h>
using namespace std;
int arr[10001];
int know = 0;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int N;
  cin >> N;
  if (N == -1) return 0;
  int lq = 1, rq = 2;
  if (N == 1) {
    cout << "! 1"
         << "\n"
         << endl;
    return 0;
  }
  for (int i = 1; i <= 2 * N; ++i) {
    int ret1, ret2;
    cout << "? " << lq << " " << rq << "\n" << endl;
    cin >> ret1;
    if (ret1 == -1) return 0;
    cout << "? " << rq << " " << lq << "\n" << endl;
    cin >> ret2;
    if (ret2 == -1) return 0;
    if (ret1 > ret2) {
      arr[lq] = ret1;
      lq = rq;
      rq++;
      know++;
    } else {
      arr[rq] = ret2;
      rq++;
      know++;
    }
    if (rq > N) {
      break;
    }
    if (know == N) break;
  }
  cout << "! ";
  for (int i = 1; i <= N; ++i) {
    if (arr[i] == 0)
      cout << N << " ";
    else
      cout << arr[i] << " ";
  }
  cout << "\n" << endl;
  return 0;
}
