#include <bits/stdc++.h>
using namespace std;
map<int, pair<int, int>> have;
map<pair<int, int>, pair<int, int>> was;
int inf = 1e9 + 100;
pair<int, int> ask(int l, int r) {
  if (was.count({l, r})) return was[{l, r}];
  cout << "? " << l + 1 << " " << r + 1 << endl;
  pair<int, int> ans;
  cin >> ans.first >> ans.second;
  was[{l, r}] = ans;
  if (!have.count(ans.first)) have[ans.first] = {inf, -1};
  return ans;
}
void upd(int x, int pos) {
  have[x].first = min(have[x].first, pos);
  have[x].second = max(have[x].second, pos);
}
void solve(int l, int r, int zl, int zr) {
  if (l > r) return;
  if (l == r) {
    int y = (ask(l, l)).first;
    upd(y, l);
    return;
  }
  if (zl == zr) {
    upd(zl, l);
    upd(zl, r);
    return;
  }
  auto now = ask(l, r);
  if (now.second == (r - l + 1)) {
    upd(now.first, l);
    upd(now.first, r);
    return;
  }
  if (now.first == zl) {
    int pos = l + now.second - 1;
    upd(zl, pos);
    upd(zl, l);
    if (pos + 1 > r) return;
    solve(pos + 1, r, zl, zr);
    return;
  }
  if (now.first == zr) {
    int pos = r - now.second + 1;
    upd(zr, pos);
    upd(zr, r);
    solve(l, pos - 1, zl, zr);
    return;
  }
  int mid = (l + r) / 2;
  int y = (ask(mid, mid)).first;
  upd(y, mid);
  if (y == zl) {
    upd(zl, l);
    upd(zl, mid);
    solve(mid + 1, r, y, zr);
    return;
  }
  if (y == zr) {
    upd(zr, r);
    upd(zr, mid);
    solve(l, mid - 1, zl, y);
    return;
  }
  solve(l, mid - 1, zl, y);
  solve(mid + 1, r, y, zr);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  solve(0, n - 1, -1, inf);
  vector<int> a(n);
  for (auto x : have) {
    for (int i = x.second.first; i <= x.second.second; i++) a[i] = x.first;
  }
  cout << "! ";
  for (auto x : a) cout << x << " ";
  cout << endl;
}
