#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;
typedef long long ll;

int main()
{
    int n;
    while(cin >> n && n) {
        vector<int> v(n);
        rep(i,n) cin >> v[i];

        string s;
        cin >> s;

        rep(i,s.size()) {
            int j = i%n;
            for(int k=v[j];k>0;k--) {
                if(s[i] == 'a') s[i] = 'Z';
                else if(s[i] == 'A') s[i] = 'z';
                else s[i]--;
            }
        }

        cout << s << endl;
    }

    return 0;
}