#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
mt19937_64 rnd64(
    chrono::high_resolution_clock::now().time_since_epoch().count());
long long power(long long a, long long m, long long mod) {
  long long ans = 1;
  while (m) {
    if (m % 2) {
      ans *= a;
      ans %= (mod);
    }
    a = (a * a) % (mod);
    m >>= 1;
  }
  return ans;
}
void init(long long* a, long long n, long long val) {
  for (long long i = 0; i < n; i++) a[i] = val;
}
long long n;
long long a[200001];
pair<long long, long long> query(long long l, long long r) {
  cout << "? " << l << " " << r << endl;
  cout.flush();
  cin >> l >> r;
  return {l, r};
}
void func(long long l, long long r, long long b, long long c) {
  if (l == r) {
    a[l] = b;
    return;
  }
  if (c == b) {
    while (l <= r) a[l] = b, l++;
    return;
  }
  pair<long long, long long> k = query(l, r);
  if (k.first == b) {
    while (k.second--) a[l] = b, l++;
    func(l, r, query(l, l).first, c);
    return;
  }
  if (k.first == c) {
    while (k.second--) a[r] = c, r--;
    func(l, r, b, query(r, r).first);
    return;
  }
  long long m = (l + r) / 2, t = query(m, m).first;
  func(l, m, b, t);
  func(m, r, t, c);
}
void solve() {
  long long i, j, _;
  cin >> n;
  func(1, n, query(1, 1).first, query(n, n).first);
  cout << "! ";
  for (i = 1; i < n + 1; i++) cout << a[i] << " ";
  cout.flush();
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
