#include <bits/stdc++.h>
const int N = 200200;
using namespace std;
int n;
int a[N];
pair<int, int> ask(int l, int r) {
  cout << "? " << l << " " << r << endl;
  int i, j;
  cin >> i >> j;
  return {i, j};
}
pair<int, int> ask(int l) { return ask(l, l); }
void solve(int l, int r, int X, int Y) {
  if (l > r) {
    return;
  } else if (X == Y) {
    for (int i = l; i <= r; i++) {
      a[i] = X;
    }
    return;
  } else if (l + 1 == r) {
    a[l] = X;
    a[r] = Y;
    return;
  }
  auto shit = ask(l, r);
  if (shit.first == X) {
    for (int i = 0; i < shit.second; i++) {
      a[l + i] = X;
    }
    solve(l + shit.second, r, ask(l + shit.second).first, Y);
    return;
  } else if (shit.first == Y) {
    for (int i = 0; i < shit.second; i++) {
      a[r - i] = Y;
    }
    solve(l, r - shit.second, X, ask(r - shit.second).first);
    return;
  }
  int m = (l + r) / 2;
  auto g = ask(m);
  assert(g.first != X && g.first != Y);
  solve(l, m, X, g.first);
  solve(m, r, g.first, Y);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  solve(1, n, ask(1).first, ask(n).first);
  cout << "!";
  for (int i = 1; i <= n; i++) cout << " " << a[i];
  cout << endl;
}
