#include <bits/stdc++.h>
using namespace std;
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[";
  for (auto vv : V) os << vv << ",";
  return os << "]";
}
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << '=' << h << endl;
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << '=' << h << ',';
  _dbg(sdbg + 1, a...);
}
const int N = 2e5 + 7;
int n, a[N];
pair<int, int> qry(int l, int r) {
  cout << "? " << l << " " << r << endl;
  int x, f;
  cin >> x;
  if (x == -1) exit(0);
  cin >> f;
  return {x, f};
}
void solve(int l, int r) {
  if (l > r) return;
  if (!a[l]) a[l] = qry(l, l).first;
  if (!a[r]) a[r] = qry(r, r).first;
  if (a[l] == a[r]) {
    for (int i = l + 1; i <= r; i++) a[i] = a[l];
    return;
  } else if (r - l - 1 > 0) {
    int x, f;
    tie(x, f) = qry(l, r);
    if (x == a[l]) {
      for (int i = 0; i < f; i++) a[l + i] = x;
      solve(l + f, r);
    } else if (x == a[r]) {
      for (int i = 0; i < f; i++) a[r - i] = x;
      solve(l, r - f);
    } else {
      int m = (l + r) / 2;
      a[m] = qry(m, m).first;
      solve(l, m);
      solve(m, r);
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cin >> n;
  solve(1, n);
  cout << "! ";
  for (int i = 1; i <= n; i++) cout << a[i] << " ";
  return 0;
}
