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;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
const int MAXN = 2e5 + 5;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
void print_string(vi aux) {
  string x = "";
  for (int i = 0; i < 26; i++) {
    for (int j = 0; j < aux[i]; j++) {
      char tt = i + 'a';
      x += tt;
    }
  }
  cout << x << endl;
}
int match(string s, vector<int>& inteiro, vector<int>& aux) {
  vi m(26, 0);
  for (int i = 0; i < 26; i++) {
    m[i] += inteiro[i];
  }
  for (int i = 0; i < 26; i++) {
    m[i] -= aux[i];
  }
  int sz = s.size();
  for (int i = 0; i < sz; i++) {
    m[s[i] - 'a'] -= 1;
  }
  int cnt_0 = 0;
  int cnt_1 = 0;
  int idx_i = -1;
  for (int i = 0; i < 26; i++) {
    if (m[i] == 0) {
      cnt_0++;
    } else if (m[i] == 1) {
      cnt_1++;
      idx_i = i;
    }
  }
  if (cnt_0 == 25 && cnt_1 == 1) {
    return idx_i;
  }
  return -1;
}
multiset<vector<int> > strings[105];
string solvee(int l, int r, string metade) {
  cout << "? " << l << " " << r << endl;
  cout.flush();
  map<vi, int> m;
  int n = r - l + 1;
  for (int i = 0; i < n + 1; i++) {
    strings[i].clear();
  }
  int qtd = n * (n + 1) / 2;
  vi inteiro(26, 0);
  for (int i = 0; i < qtd; i++) {
    string s;
    cin >> s;
    int sz = s.size();
    vi cnt(26, 0);
    for (int j = 0; j < sz; j++) {
      cnt[s[j] - 'a']++;
    }
    strings[sz].insert(cnt);
    if (sz == n) {
      for (int j = 0; j < 26; j++) {
        inteiro[j] = cnt[j];
      }
    }
  }
  string pref = "";
  string suf = "";
  int rem = 0;
  int falta = n;
  for (int i = n - 1; i >= 1; i--) {
    int pos[2];
    vi usado(n + 1, 0);
    for (int j = 1; j <= rem; j++) {
      vi aux(26, 0);
      for (int k = 0; k < 26; k++) {
        aux[k] += inteiro[k];
      }
      int comple = rem - j + 1;
      for (int k = 0; k < j; k++) {
        aux[pref[k] - 'a'] -= 1;
      }
      for (int k = 0; k < comple; k++) {
        aux[suf[k] - 'a'] -= 1;
      }
      strings[i].erase(strings[i].find(aux));
    }
    int sz = strings[i].size();
    if (falta >= 2) {
      auto it = strings[i].begin();
      vi aux = (*it);
      it++;
      vi aux2 = (*it);
      int pref1 = match(pref, inteiro, aux);
      int pref2 = match(pref, inteiro, aux2);
      int suf1 = match(suf, inteiro, aux);
      int suf2 = match(suf, inteiro, aux2);
      char pre = 'a';
      char su = 'a';
      if (pref1 >= 0 && pref2 >= 0) {
        int spr = pref.size();
        if (metade[spr] == pref1 + 'a') {
          pre += pref1;
          su += suf2;
        } else {
          pre += pref2;
          su += suf1;
        }
      } else if (pref1 >= 0) {
        pre += pref1;
        su += suf2;
      } else {
        pre += pref2;
        su += suf1;
      }
      pref = pref + pre;
      suf = suf + su;
      falta -= 2;
    } else if (falta == 1) {
      auto it = strings[i].begin();
      vi aux = (*it);
      int k = match(pref, inteiro, aux);
      if (k < 0) {
        k = match(suf, inteiro, aux);
      }
      char pre = 'a' + k;
      pref = pref + pre;
      falta -= 1;
    }
    if (falta == 0) break;
    rem++;
  }
  reverse(suf.begin(), suf.end());
  string todo = pref + suf;
  return todo;
}
void ler(int l, int r, int si) {
  cout << "? " << l << " " << r << endl;
  cout.flush();
  int n = r - l + 1;
  int qtd = n * (n + 1) / 2;
  for (int i = 0; i < qtd; i++) {
    string s;
    cin >> s;
    int sz = s.size();
    vi cnt(26, 0);
    for (int j = 0; j < sz; j++) {
      cnt[s[j] - 'a']++;
    }
    if (si == 1) {
      strings[sz].insert(cnt);
    } else {
      strings[sz].erase(strings[sz].find(cnt));
    }
  }
}
string solve_metade(int l, int r) {
  int n = r - l + 1;
  for (int i = 0; i < n + 1; i++) {
    strings[i].clear();
  }
  ler(l, r, 1);
  ler(l, r - 1, 0);
  string ans = "";
  for (int i = 1; i <= n; i++) {
    auto it = strings[i].begin();
    vi cnt_at = (*it);
    int sz = ans.size();
    for (int i = 0; i < sz; i++) {
      cnt_at[ans[i] - 'a']--;
    }
    for (int i = 0; i < 26; i++) {
      if (cnt_at[i] == 1) {
        char x = 'a' + i;
        ans = ans + x;
        break;
      }
    }
  }
  reverse(ans.begin(), ans.end());
  return ans;
}
char query_unico(int i) {
  cout << "? " << i << " " << i << endl;
  cout.flush();
  string u;
  cin >> u;
  return u[0];
}
void solve() {
  int n;
  cin >> n;
  if (n <= 3) {
    string ans = "";
    for (int i = 0; i < n; i++) {
      char x = query_unico(i + 1);
      ans = ans + x;
    }
    cout << "! " << ans << endl;
  } else {
    string metade = solve_metade(1, n / 2);
    string todo = solvee(1, n, metade);
    cout << "! " << todo << endl;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}