#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
int n, arr[N];
void ask(int l, int r, int &f, int &x) {
  printf("? %d %d\n", l, r);
  fflush(stdout);
  scanf("%d%d", &x, &f);
}
void solve(int l, int r, int f, int x) {
  if (l > r) return;
  if (f == (r - l + 1)) {
    for (int i = l; i <= r; i++) {
      arr[i] = x;
    }
    return;
  }
  if (f == 1) {
    arr[l] = x;
    solve(l + 1, r, -1, -1);
    return;
  }
  if (l == r) {
    ask(l, r, r, arr[l]);
    return;
  }
  int mid = (l + r) / 2;
  int f1, x1, f2, x2;
  ask(l, mid, f1, x1);
  if (x1 == x && f1 < f) {
    for (int i = mid; i > mid - f1; i--) arr[i] = x;
    for (int i = mid + 1; i <= mid + (f - f1); i++) arr[i] = x;
    solve(l, mid - f1, -1, -1);
    solve(mid + (f - f1) + 1, r, -1, -1);
    return;
  } else {
    ask(mid + 1, r, f2, x2);
    if (x2 == x && f2 < f) {
      for (int i = mid; i > mid - (f - f2); i--) arr[i] = x;
      for (int i = mid + 1; i <= mid + f2; i++) arr[i] = x;
      solve(l, mid - (f - f2), f1, x1);
      solve(mid + f2 + 1, r, -1, -1);
      return;
    }
  }
  if (x1 == x2) {
    for (int i = mid; i > mid - f1; i--) arr[i] = x1;
    for (int i = mid + 1; i <= mid + f2; i++) arr[i] = x1;
    solve(l, mid - f1, -1, -1);
    solve(mid + f2 + 1, r, -1, -1);
    return;
  }
  solve(l, mid, f1, x1);
  solve(mid + 1, r, f2, x2);
}
int main() {
  scanf("%d", &n);
  solve(1, n, -1, -1);
  printf("!");
  for (int i = 1; i <= n; i++) {
    printf(" %d", arr[i]);
  }
  puts("");
  fflush(stdout);
  return 0;
}
