#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const int mod = (int)(1e9) + 7;
const int inf = 0x7fffffff;
const int N = (int)(2e4) + 7;
int n, p[N], t[N];
int main() {
  scanf("%d", &n);
  int L = 1, R = n;
  while (L < R) {
    int x, y;
    printf("? %d %d\n", L, R);
    fflush(stdout);
    scanf("%d", &x);
    printf("? %d %d\n", R, L);
    fflush(stdout);
    scanf("%d", &y);
    if (x > y)
      p[L++] = x, t[x] = 1;
    else
      p[R--] = y, t[y] = 1;
  }
  int flg = 0;
  for (int i = 1; i <= n; ++i) {
    if (!t[i]) {
      flg = i;
      break;
    }
  }
  printf("! ");
  for (int i = 1; i <= n; ++i) {
    if (p[i])
      printf("%d ", p[i]);
    else
      printf("%d ", flg);
  }
  return 0;
}
