#include <bits/stdc++.h>
using namespace std;
const int kMAxn = 2e5 + 5;
int N, M;
int p[kMAxn];
void solve(int l, int r);
int main() {
  cin >> N;
  solve(1, N);
  cout.flush();
  cout << "! ";
  for (int i = 1; i < N; i++) cout << p[i] << " ";
  cout << p[N] << endl;
  return 0;
}
void solve(int l, int r) {
  if (l > r) return;
  auto ask = [](int left, int right) {
    int x, f;
    cout.flush();
    cout << "? " << left << " " << right << endl;
    cin >> x >> f;
    return make_pair(x, f);
  };
  int x, f;
  tie(x, f) = ask(l, r);
  int possleft = r - f + 1, possright = l + f - 1;
  if (possleft <= possright) {
    for (int i = possleft; i <= possright; i++) p[i] = x;
    solve(l, possleft - 1);
    solve(possright + 1, r);
  } else {
    int mid = (l + r) >> 1;
    solve(l, mid);
    solve(mid + 1, r);
  }
}
