#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    char conv[256];
    int conv2[256];
    
    for (int i = 0; i < 26; i++){
        conv[i] = 'a' + i;
        conv[i + 26] = 'A' + i;
        conv2['a' + i] = i;
        conv2['A' + i] = i + 26;
    }
    
    while (scanf("%d", &n) && n){
        int a[128];
        char s[128];
        
        for (int i = 0; i < n; i++) scanf("%d", &a[i]);
        
        scanf("%s", s);
        
        for (int i = 0; s[i]; i++){
            printf("%c", conv[(conv2[s[i]] - a[i % n] + 52) % 52]);
        }
        printf("\n");
    }
    
    return (0);
}
#include <iostream>
#include <vector>
#include <map>
using namespace std;

int main(){
    int n;
    while(cin>>n,n){
        vector<int> a;
        for(int i=0,t;i<n;++i){
            cin>>t;
            a.push_back(t);
        }
        string s,ans;
        cin>>s;

        string alpha;
        map<char, int> alphaM;
        int id = 0;
        for(char c = 'a'; c <= 'z'; c++) {
            alpha.push_back(c);
            alphaM[c] = id++;
        }
        for(char c = 'A'; c <= 'Z'; c++) {
            alpha.push_back(c);
            alphaM[c] = id++;
        }


        for(int i=0;i<s.size();++i){
            int x=a[i%a.size()];
            int id2 = alphaM[s[i]];
            ans += alpha[(id2-x+52)%52];
        }
        cout<<ans<<endl;
    }
}