Add and Minimize
You are given an array and a string .
You can change the order of elements in the array as you like.
Your task is to make the string lexicographically minimal.
means that has been replaced by the next letter in the alphabet exactly times. The letter "z" is replaced by "a".
A string is lexicographically smaller than a string if in the first position where and differ, the character at position is smaller than the character at position .
Input
The first line contains the number () — the size of the array and the string.
The second line contains integers () — the elements of the array .
The third line contains the string with characters. It is guaranteed that all characters in the string are lowercase letters of the English alphabet.
Output
Output the lexicographically minimal string after changing the order of the elements in .
Examples
Note
In the first test, there are a total of ways to change the order of the array elements:
, "";
, "";
, "";
, "";
, "";
, "".
The lexicographically minimal of these strings is "".
In the second test, the optimal order of elements is .
Scoring
In this problem, there are conditional blocks. If your solution works correctly for certain constraints, it will receive a certain number of points. Please note that the evaluation is still being tested.
(5 points): , ;
(20 points): ;
(75 points): without additional constraints.