#include <iostream>
#include <vector>

using namespace std;

int main(){
	int n;
	while(cin >> n && n!=0){
		vector<int> v(n);
		for(int i=0;i<n;i++){
			cin >> v[i];
		}
		string s;
		cin >> s;
		int x;
		for(int i=0;i<s.size();i++){
			x = v[i%n];
			while(1){
				if(x==0)break;
				if(s[i]<='z'&&s[i]>='a'){
					if(s[i]-x<'a'){
						x-= (s[i]-'a')+1;
						s[i]='Z';
					}else{
						s[i] = s[i]-x;
						break;
					}
				}else{
					if(s[i]-x<'A'){
						x-= (s[i]-'A')+1;
						s[i]='z';
					}else{
						s[i] = s[i]-x;
						break;
					}
				}
			}
			cout << s[i];
		}
		cout << endl;
	}
	return 0;
}