A reversing prefixes machine (RPM) is being tested in the Laboratory of Intelligent Prefixes Algorithms (LIPA). The machine works as follows: it receives as input a string of length and a sequence 1 \le a_1 < a_2 < \ldots < a_k \le n. Initially, the string is loaded into the internal register of the machine. Then, for each from to , the machine takes the prefix [1..a_i] of the string in the register and reverses it. The string remaining in the register after all operations have been completed is the output of the machine.
For example, if the input to the machine is s = \texttt{abacaba} and a_1 = 2, a_2 = 4, the output of the machine is .
The LIPA scientists want to find the lexicographically smallest string that can be the output of the machine for a given input . Help them with this task.
The input file contains a string (its length does not exceed ). It consists only of lowercase English letters.
Output the lexicographically smallest string that can be the output of the RPM for the input .
Example 1