#include <iostream>
#include <set>
#include <vector>

using namespace std;

vector<int> a;
int opened = 0;

int askDifferences(int left, int right) {
  cout << "? " << left + 1 << " " << right + 1 << endl;
  cout.flush();
  int ans;
  cin >> ans;
  return ans;
}

int getDifferencesFromArray(int left, int right) {
  set<int> ans;
  for (int i = left; i <= right; i++) ans.insert(a[i]);
  return ans.size();
}

int getDifferences(int left, int right) {
  if (left > right) return 0;
  if (left == right) return 1;
  if (right <= opened) return getDifferencesFromArray(left, right);
  return askDifferences(left, right);
}

int main(void) {
  int n, left, right, middle, k = 1;
  cin >> n;
  a = vector<int>(n, 0);
  a[0] = 1;
  for (int i = 1; i < n; i++) {
    // let's get a[i]
    left = 0; right = i;
    while (left < right) {
      middle = (left + right) / 2;
      if (getDifferences(middle, i) != getDifferences(middle, i - 1)) {
        right = middle;
      } else {
        left = middle + 1;
      }
    }
    if (left == 0)
      a[i] = ++k;
    else
      a[i] = a[left - 1];
    if (a[i] == 0) return 1;
    opened = i;
  }
  cout << "Ready!" << endl;
  cout.flush();
  cout << k << endl;
  cout.flush();
  for (int i = 0; i < n; i++) cout << min(max(a[i], 0), k) << " ";
  cout << endl;
  cout.flush();
  return 0;
}
