F. Erasing Substringstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou 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 2i - 1 from s.Print the lexicographically minimal string you may obtain after performing k such operations.InputThe only line contains one string s consisting of n lowercase Latin letters (1 ≤ n ≤ 5000).OutputPrint the lexicographically minimal string you may obtain after performing k operations.ExamplesInputadcbcaOutputabaInputabacabadabacabaOutputaabacabaNotePossible operations in examples:  adcbca  adcba  aba;  abacabadabacaba  abcabadabacaba  aabadabacaba  aabacaba. 
Inputadcbca
Outputaba
['bitmasks', 'dp', 'greedy', '*2700']