#include<iostream>
#include<string>

using namespace std;

#define NMAX 100

int main(){

	int n;
	int k[NMAX];
	string s;
	string sta("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
	int ans;

	while(1){
		cin>>n;
		if(n==0) break;
		for(int i=0;i<n;i++) cin>>k[i];
		cin>>s;
		for(int i=0;i<s.size();i++){
			ans=sta.find(s[i]);
			ans-=k[i%n];
			if(ans<0) ans+=sta.size();
			s[i]=sta[ans];
		}
		cout<<s<<endl;
	}

}