Tommy has just invented an interesting string encoding algorithm, which is described below.
For every string , we may define a character-mapping function , which maps every character occurring in to a lowercase letter, as below
where is the -th lowercase Latin letter, and is the number of different characters after the last occurrence of in .
To encode a string by Tommy's algorithm, replace every character in by simultaneously.
For example, the encoded string of "abc" is "cba", and the encoded string of "cac" is "aba".
You are given a string of length and then encode all the nonempty subsequences. Your task is to find the encoded string that has the greatest lexicographical order among all the encoded strings.
输入描述:
The first line contains an integer .
The second line contains a string of length , which consists of only the first lowercase letters, 'a' to 't'.
输出描述:
Output the encoded string that has the greatest lexicographical order among all the encoded strings.