#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using pii = pair<int, int>;
using vii = vector<pii>;
using ll = long long;
int solve();
int main(int argc, char* argv[]) {
  ::std::ios::sync_with_stdio(false);
  ::std::cin.tie(0);
  ::std::cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
}
constexpr int N = 1 << 18;
int a[N];
pii ask(int L, int R) {
  cout << "? " << L << ' ' << R << endl;
  int x;
  cin >> x;
  if (x == -1) exit(0);
  int f;
  cin >> f;
  return pii(x, f);
}
void solve(int L, int R) {
  if (L > R) return;
  pii p = ask(L, R);
  int x = p.first;
  int f = p.second;
  int L_next = R - f + 1;
  int R_next = L + f - 1;
  if (L_next <= R_next) {
    for (int i = L_next; i <= R_next; ++i) {
      a[i] = x;
    }
    solve(L, L_next - 1);
    solve(R_next + 1, R);
  } else {
    int middle = (L + R) / 2;
    solve(L, middle);
    solve(middle + 1, R);
  }
}
int solve() {
  int n;
  cin >> n;
  solve(1, n);
  cout << "! ";
  for (int i = 1; i <= n; ++i) {
    cout << a[i] << ' ';
  }
  cout << endl;
  return 0;
}
