#include <iostream>
#include <string>
using namespace std;
int main(){
	int n;
	string r[52]={"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
	while(cin>>n){
		if(n==0) break;
		int a[n];
		for(int i=0;i<n;i++){
			cin>>a[i];
		}
		string s;
		cin>>s;
		int len=s.size();
		for(int i=0;i<len;i++){
			string si=s.substr(i,1);
			for(int j=0;j<52;j++){
				if(r[j]==si){
					cout<<r[(j-a[i%n]+52)%52];
					break;
				}
			}
		}
		cout<<endl;
	}
    return 0;
}