#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <set>
#include <math.h>
using namespace std;

const int MAXN = 3e3 + 5;
int ans[MAXN], pos[MAXN];
set <pair <int, int>> st;

int main()
{
  int n, k;
  cin >> n;

  cout << "? 1 " << n << "\n";
  cin >> k;

  pos[1] = 1;
  st.insert(make_pair(-1, 1));
  ans[1] = 1;

  for (int i = 2; i <= k; i++)
  {
    int l = pos[i - 1], r = n + 1, p;

    if (pos[i] != 0)
      r = pos[i];

    while (r - l > 1)
    {
      int m = (l + r) / 2;
      cout << "? 1 " << m << "\n";
      cin >> p;

      if (p == i - 1)
        l = m;
      else
      {
        r = m;
        pos[p] = m;
      }
    }

    pos[i] = r;
    ans[r] = i;
    //cout << i << " " << r << "\n";
  }

  int p;

  for (int i = 1; i < pos[2]; i++)
  {
    ans[i] = 1;
    pos[1] = max(pos[1], i);
  }

  st.erase(make_pair(-1, 1));
  st.insert(make_pair(-pos[1], 1));

  int ma = 1;

  //cout << pos[1] << "!";

  for (int i = 1; i <= n; i++)
  {
    if (ans[i] != 0)
    {
      if (ans[i] > ma)
      {
        st.insert(make_pair(-pos[ans[i]], ans[i]));
        ma = ans[i];
      }
      continue;
    }

    int c = 1;

    for (std::set<pair<int, int>>::iterator it = st.begin(); it != st.end(); it++)
    {
      int x = it->first, zn = it->second;
      cout << "? " << -x << " " << i << "\n";
      cin >> p;
      if (p == c)
      {
        ans[i] = zn;
        break;
      }
      else 
        c = p;
    }

    st.erase(make_pair(-pos[ans[i]], ans[i]));
    pos[ans[i]] = max(pos[ans[i]], i);      
    st.insert(make_pair(-pos[ans[i]], ans[i]));

    /*for (int i = 1; i <= n; i++)
      cout << ans[i] << " ";
    cout << "\n";*/
  } 

  cout << "Ready!\n" << k << "\n";

  for (int i = 1; i <= n; i++)
    cout << ans[i] << " ";

  return 0;
}







    