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;
char s[110];
int cnt[110][30], vis[30], has[110], ow[110];
int nn;
int edge[50][50];
unsigned long long P[50], now[110];
bool hasans = false;
vector<int> vec, cad[110];
multiset<unsigned long long> hsh[110];
void init() {
  const unsigned long long base = 19260817;
  P[0] = base;
  for (int i = 1; i < 26; i++) P[i] = P[i - 1] * base;
}
void clean() {
  memset(cnt, 0, sizeof(cnt));
  memset(vis, 0, sizeof(vis));
  memset(has, 0, sizeof(has));
  memset(now, 0, sizeof(now));
  memset(edge, 0, sizeof(edge));
  for (int i = 0; i <= 101; i++) {
    cad[i].clear();
    hsh[i].clear();
  }
}
bool check(int cur, int x) {
  for (int i = 0; i < cur; i++) {
    unsigned long long tmp = P[x] + now[i];
    if (!hsh[cur + 1 - i].count(tmp)) return false;
  }
  return true;
}
void add(int cur, int x) {
  for (int i = 0; i < cur; i++) {
    now[i] += P[x];
    auto it = hsh[cur + 1 - i].find(now[i]);
    hsh[cur + 1 - i].erase(it);
  }
  now[cur] = P[x];
}
void del(int cur, int x) {
  for (int i = 0; i < cur; i++) {
    hsh[cur + 1 - i].insert(now[i]);
    now[i] -= P[x];
  }
  now[cur] = 0;
}
void dfs(int cur) {
  if (cur == nn) {
    hasans = 1;
    return;
  }
  for (int x = 0; x < 2; x++) {
    int i = cad[cur + 1][x];
    if (edge[vec[cur - 1]][i])
      if (check(cur, i)) {
        edge[vec[cur - 1]][i]--;
        edge[i][vec[cur - 1]]--;
        vec.emplace_back(i);
        add(cur, i);
        dfs(cur + 1);
        if (hasans) return;
        del(cur, i);
        vec.pop_back();
        edge[vec[cur - 1]][i]++;
        edge[i][vec[cur - 1]]++;
      }
    if (cad[cur + 1][0] == cad[cur + 1][1]) break;
  }
}
void solve(int n, int st) {
  clean();
  nn = n;
  printf("? %d %d\n", 1, n);
  fflush(stdout);
  int num = n * (n + 1) / 2;
  for (int i = 1; i <= num; i++) {
    scanf("%s", s);
    int len = strlen(s);
    for (int j = 0; j < len; j++) cnt[len][s[j] - 'a']++;
    if (len == 2) {
      edge[s[0] - 'a'][s[1] - 'a']++;
      edge[s[1] - 'a'][s[0] - 'a']++;
    }
    if (len == n) {
      for (int j = 0; j < n; j++) vis[s[j] - 'a']++;
    }
    has[len]++;
    int id = has[len] + ow[len - 1];
    unsigned long long tmp = 0;
    for (int j = 0; j < len; j++) tmp += P[s[j] - 'a'];
    hsh[len].insert(tmp);
  }
  int mark = 0;
  for (; mark < 26; mark++)
    if (cnt[2][mark] != (vis[mark] << 1)) break;
  for (int i = 1; i <= n - i + 1; i++) {
    for (int j = 1; j < i; j++)
      for (auto x : cad[j]) cnt[i + 1][x] -= j;
    for (int j = 0; j < 26; j++)
      if (cnt[i + 1][j] != vis[j] * (i + 1)) {
        cad[i].emplace_back(j);
        cad[n - i + 1].emplace_back(j);
      }
    if (cad[i].size() == 1) {
      cad[i].emplace_back(cad[i][0]);
      cad[n - i + 1].emplace_back(cad[i][0]);
    }
    for (auto x : cad[i]) vis[x]--;
  }
  if (st == 1) {
    vec.emplace_back(mark);
    now[0] = P[mark];
  } else {
    now[0] = P[vec[0]];
    for (int i = 1; i < vec.size(); i++) {
      cad[i + 1].clear();
      cad[i + 1].emplace_back(vec[i]);
    }
    int tmp = vec[0];
    vec.clear();
    vec.emplace_back(tmp);
    now[0] = P[tmp];
  }
  hasans = 0;
  dfs(1);
  if (st == 1) {
    int ask = -1, rev = 0;
    for (int i = 0; i < n; i++)
      if (vec[i] != vec[n - 1 - i]) {
        ask = i;
        break;
      }
    if (ask != -1) {
      printf("? %d %d\n", ask + 1, ask + 1);
      fflush(stdout);
      scanf("%s", s);
      if ((s[0] - 'a') != vec[ask]) rev = 1;
    }
    if (rev) reverse(vec.begin(), vec.end());
  }
}
int main() {
  init();
  int n;
  scanf("%d", &n);
  if (n <= 3) {
    for (int i = 1; i <= n; i++) {
      printf("? %d %d\n", i, i);
      fflush(stdout);
      scanf("%s", s + i - 1);
    }
    printf("! %s\n", s);
  } else {
    ow[0] = 0;
    for (int i = 1; i <= n; i++) ow[i] = ow[i - 1] + (n - i + 1);
    solve(n / 2, 1);
    solve(n, n / 2);
    printf("! ");
    for (int i = 0; i < n; i++) printf("%c", 'a' + vec[i]);
    printf("\n");
  }
}