#include <bits/stdc++.h>
using namespace std;
vector<int> ans;
pair<int, int> ask(int l, int r) {
  cout << "? " << l + 1 << ' ' << r + 1 << endl;
  int x, f;
  cin >> x;
  if (x == -1) exit(0);
  cin >> f;
  return make_pair(x, f);
}
void solve(int l, int r, int rmval) {
  if (l > r) return;
  int origl = l;
  pair<int, int> aux = ask(l, r);
  int x = aux.first, f = aux.second;
  if (f == r - l + 1) {
    for (int i = (l); i < (r + 1); i++) ans[i] = x;
    return;
  }
  if (x == rmval) {
    for (int i = (0); i < (f); i++) ans[r - i] = x;
    solve(l, r - f, -1);
    return;
  }
  if (f == 1) {
    for (int i = (l); i < (r + 1); i++) {
      aux = ask(i, i);
      ans[i] = aux.first;
    }
    return;
  }
  while (l <= r && (l == 0 || ans[l - 1] != x)) {
    solve(l, min(l + f - 1, r), x);
    l += f;
  }
  if (l > r) return;
  vector<int>::iterator ite =
      lower_bound(ans.begin() + origl, ans.begin() + l, x);
  f -= (int)((ans.begin() + l) - ite);
  assert(f >= 0);
  for (int i = (0); i < (f); i++) ans[l + i] = x;
  solve(l + f, r, -1);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  ans.resize(n, -1);
  solve(0, n - 1, -1);
  cout << "!";
  for (auto it = ans.begin(); it != ans.end(); it++) cout << ' ' << *it;
  cout << endl;
  return 0;
}
