We’re preparing your current view and syncing the latest data.
You are given a string s. The task is to perform a sequence of operations to obtain the lexicographically smallest string possible according to the rules defined in the problem. The specific operations and rules are described in the original Codeforces Problem 797C.
The first line contains a single integer n — the length of the string (1 ≤ n ≤ 2·10^5). The second line contains the string s consisting of lowercase Latin letters.
Print the lexicographically minimal string that can be obtained by performing the given operations.
1 ≤ n ≤ 2·10^5 s consists of lowercase Latin letters.
Example 1
Input
6 bcdbac
Output
abccdb
Explanation
One sequence of operations leads to the minimal string abccdb.