CF938F Erasing Substrings
Description
You are given a string $ s $ , initially consisting of $ n $ lowercase Latin letters. After that, you perform $ k $ operations with it, where . During $ i $ -th operation you must erase some substring of length exactly $ 2^{i-1} $ from $ s $ .
Print the lexicographically minimal string you may obtain after performing $ k $ such operations.
Input Format
The only line contains one string $ s $ consisting of $ n $ lowercase Latin letters ( $ 1
Output Format
Print the lexicographically minimal string you may obtain after performing $ k $ operations.
Explanation/Hint
Possible operations in examples:
1. adcbca  adcba  aba;
2. abacabadabacaba  abcabadabacaba  aabadabacaba  aabacaba.