Problem: This problem is different with easy version only by constraints on total answers length

It is an interactive problem

Venya joined a tour to the madhouse, in which orderlies play with patients the following game. Orderlies pick a string s of length n, consisting only of lowercase English letters. The player can ask two types of queries: 

  * ? l r – ask to list all substrings of s[l..r]. Substrings will be returned in random order, and in every substring, all characters will be randomly shuffled. 
  * ! s – guess the string picked by the orderlies. This query can be asked exactly once, after that the game will finish. If the string is guessed correctly, the player wins, otherwise he loses. 



The player can ask no more than 3 queries of the first type.

To make it easier for the orderlies, there is an additional limitation: the total number of returned substrings in all queries of the first type must not exceed \left⌈ 0.777(n+1)^2 \right⌉ (⌈ x ⌉ is x rounded up).

Venya asked you to write a program, which will guess the string by interacting with the orderlies' program and acting by the game's rules.

Your program should immediately terminate after guessing the string using a query of the second type. In case your program guessed the string incorrectly, or it violated the game rules, it will receive verdict Wrong answer.

Note that in every test case the string is fixed beforehand and will not change during the game, which means that the interactor is not adaptive.

Input

First line contains number n (1 ≤ n ≤ 100) — the length of the picked string.

Interaction

You start the interaction by reading the number n.

To ask a query about a substring from l to r inclusively (1 ≤ l ≤ r ≤ n), you should output

? l r

on a separate line. After this, all substrings of s[l..r] will be returned in random order, each substring exactly once. In every returned substring all characters will be randomly shuffled.

In the case, if you ask an incorrect query, ask more than 3 queries of the first type or there will be more than \left⌈ 0.777(n+1)^2 \right⌉ substrings returned in total, you will receive verdict Wrong answer.

To guess the string s, you should output

! s

on a separate line.

After printing each query, do not forget to flush the output. Otherwise, you will get Idleness limit exceeded. To flush the output, you can use: 

  * fflush(stdout) or cout.flush() in C++; 
  * System.out.flush() in Java; 
  * flush(output) in Pascal; 
  * stdout.flush() in Python; 
  * see documentation for other languages. 



If you received - (dash) as an answer to any query, you need to terminate your program with exit code 0 (for example, by calling exit(0)). This means that there was an error in the interaction protocol. If you don't terminate with exit code 0, you can receive any unsuccessful verdict. 

Hack format

To hack a solution, use the following format:

The first line should contain one integer n (1 ≤ n ≤ 100) — the length of the string, and the following line should contain the string s.

Example

Input


4

a
aa
a

cb
b
c

c

Output


? 1 2

? 3 4

? 4 4

! aabc

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
const long long LLINF = 9223372036854775807LL;
struct Response {
  int fr, to;
  vector<string> vs;
  Response(int fr, int to, const vector<string>& vs) : fr(fr), to(to), vs(vs) {}
};
Response ask(int l, int r) {
  cout << "? " << l << " " << r << endl;
  vector<string> result;
  for (int i = l; i <= r; ++i)
    for (int j = i; j <= r; ++j) {
      string curs;
      cin >> curs;
      result.push_back(curs);
    }
  return Response(l - 1, r - 1, result);
}
void fin(string s) {
  cout << "! " << s << endl;
  exit(0);
}
struct St {
  multiset<char> ms;
  St() = default;
  explicit St(const vector<char>& v) : ms(v.begin(), v.end()) {}
  St inters(const St& oth) const {
    vector<char> res(int((ms).size()));
    res.erase(set_intersection(ms.begin(), ms.end(), oth.ms.begin(),
                               oth.ms.end(), res.begin()),
              res.end());
    return St(res);
  }
  St subtract(const St& oth) const {
    vector<char> res(int((ms).size()));
    res.erase(set_difference(ms.begin(), ms.end(), oth.ms.begin(), oth.ms.end(),
                             res.begin()),
              res.end());
    return St(res);
  }
  bool operator==(const St& oth) const { return ms == oth.ms; }
  bool operator!=(const St& oth) const { return ms != oth.ms; }
  bool operator<(const St& oth) const { return ms < oth.ms; }
};
int n;
const int maxn = 110;
char fc[maxn];
void update_info(int wlen, const Response& resp) {
  if (wlen >= resp.to - resp.fr + 1) return;
  St known;
  for (int i = resp.fr; i + wlen - 1 <= resp.to; ++i) {
    int wfr = i;
    int wto = i + wlen - 1;
    for (int j = 0; j <= resp.to; ++j) {
      if (j >= wfr && j <= wto) continue;
      if (fc[j] == 0) continue;
      known.ms.insert(fc[j]);
    }
  }
  string full_str = *max_element(resp.vs.begin(), resp.vs.end(),
                                 [](const string& x, const string& y) {
                                   return int((x).size()) < int((y).size());
                                 });
  St from_req;
  for (const string& s : resp.vs) {
    if (int((s).size()) != wlen) continue;
    for (char c : St(vector<char>(full_str.begin(), full_str.end()))
                      .subtract(St(vector<char>(s.begin(), s.end())))
                      .ms)
      from_req.ms.insert(c);
  }
  auto rm = from_req.subtract(known).ms;
  if (int((rm).size()) != 1) return;
  char curc = *rm.begin();
  for (int i = resp.fr; i <= resp.to; ++i) {
    if (i <= resp.fr + wlen - 1 && i >= resp.to - wlen + 1) continue;
    if (fc[i] == 0) fc[i] = curc;
  }
}
int main() {
  cin >> n;
  if (n < 3) {
    Response r1 = ask(1, n);
    if (n == 1) fin(r1.vs[0]);
    Response r2 = ask(1, n - 1);
    string s1 = *max_element(r1.vs.begin(), r1.vs.end(),
                             [](const string& x, const string& y) {
                               return int((x).size()) < int((y).size());
                             });
    string s2 = *max_element(r2.vs.begin(), r2.vs.end(),
                             [](const string& x, const string& y) {
                               return int((x).size()) < int((y).size());
                             });
    fc[n - 1] = *St(vector<char>(s1.begin(), s1.end()))
                     .subtract(St(vector<char>(s2.begin(), s2.end())))
                     .ms.begin();
    for (int wlen = n - 1; wlen >= 1; --wlen) {
      update_info(wlen, r2);
      update_info(wlen, r1);
    }
    string res(fc);
    fin(res);
    return 0;
  }
  int m1 = n / 2;
  Response r1 = ask(1, m1 + 1);
  Response r2 = ask(1, m1);
  string s1 = *max_element(r1.vs.begin(), r1.vs.end(),
                           [](const string& x, const string& y) {
                             return int((x).size()) < int((y).size());
                           });
  string s2 = *max_element(r2.vs.begin(), r2.vs.end(),
                           [](const string& x, const string& y) {
                             return int((x).size()) < int((y).size());
                           });
  fc[m1] = *St(vector<char>(s1.begin(), s1.end()))
                .subtract(St(vector<char>(s2.begin(), s2.end())))
                .ms.begin();
  for (int wlen = m1; wlen >= 1; --wlen) {
    update_info(wlen, r2);
    update_info(wlen, r1);
  }
  Response r3 = ask(1, n);
  for (int wlen = n - 1; wlen >= 1; --wlen) {
    update_info(wlen, r3);
  }
  string res(fc);
  fin(res);
  return 0;
}