#include <iostream>

using namespace std;

int main()
{
    int n;
    cin>>n;
    int a[n],b[26]={0};
    for(int i=0;i<n;i++)
    {
        cin>>a[i];a[i]%=26;
        b[a[i]]++;
    }
    string s;
    cin>>s;
    for(int i=0;i<n;i++)
    {
        int j=(26-s[i]+'a')%26;
        while(1)
        {
            if(b[j]>0)
            {
                s[i]=(s[i]-'a'+j)%26+'a';
                b[j]--;
                break;
            }
            j=(j+1)%26;
        }
    }
    cout<<s<<endl;
}
