#include <bits/stdc++.h>
using namespace std;
const int MX = 200005;
int n, a[MX];
set<int> st;
pair<int, int> query(int l, int r) {
  int x, f;
  cout << "? " << l << " " << r << endl;
  cin >> x;
  if (x == -1) exit(0);
  cin >> f;
  return {x, f};
}
void solve(int i, int j, int mn) {
  if (i > j) return;
  pair<int, int> r = query(i, j);
  if (r.first == mn) {
    for (int k = 0; k < r.second; k++) a[i + k] = r.first;
    return solve(i + r.second, j, r.first);
  }
  if (j - i + 1 == r.second) {
    for (int k = 0; k < r.second; k++) a[i + k] = r.first;
    return;
  }
  if (st.count(r.first)) {
    for (int k = 0; k < r.second; k++) a[j - k] = r.first;
    return solve(i, j - r.second, mn);
  }
  st.insert(r.first);
  for (int k = i; k <= j; k += r.second) {
    if (k != i) mn = a[k - 1];
    solve(k, min(j, k + r.second - 1), mn);
  }
}
int main() {
  cin >> n;
  solve(1, n, 1);
  cout << "!";
  for (int i = 1; i <= n; i++) cout << " " << a[i];
  cout << endl;
  return 0;
}
