#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long n, o[200010];
map<long long, long long> m;
pair<long long, long long> query(long long l, long long r) {
  cout << "? " << l + 1 << " " << r + 1 << '\n';
  cout << flush;
  long long x, y;
  cin >> x >> y;
  return {x, y};
}
long long func(long long l, long long r) {
  if (l > r) return l;
  pair<long long, long long> tem = query(l, r);
  long long x = tem.first, f = tem.second;
  if (m.count(x) == 1) {
    if (m[x] == f) {
      assert(r - l + 1 == f);
      for (long long i = l; i <= r; i++) o[i] = x;
      m.erase(m.find(x));
      return r + 1;
    } else {
      long long ql = r - f + 1, qr = ql + m[x] - 1;
      m.erase(m.find(x));
      for (long long i = ql; i <= qr; i++) o[i] = x;
      func(l, ql - 1);
      return qr + 1;
    }
  } else if (f == r - l + 1) {
    for (long long i = l; i <= r; i++) o[i] = x;
    return r + 1;
  } else {
    m[x] = f;
    long long ql = l;
    while (m.count(x)) {
      ql = func(ql, ql + f - 1);
    }
    return func(ql, r);
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  func(0, n - 1);
  cout << "!";
  for (long long i = 0; i < n; i++) cout << " " << o[i];
  cout << '\n';
  return 0;
}
