Given a string consisting of lowercase Latin letters, you need to perform operations on it, where k = \lfloor \log_2 n \rfloor. In the -th operation, you must remove a substring of length exactly 2^{i-1} from .
Your task is to output the lexicographically smallest string possible after completing all the operations.
The input consists of a single line containing the string , which has lowercase Latin characters, where 1 \le n \le 5000.
Print the lexicographically smallest string that can be obtained after performing all operations.
Example 1
Example 2