#include <iostream>
#include <map>

using namespace std;
int n;
int a[110];
string station ="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
int main(){
  map<char,int> place;
  for(int i = 0;i < station.length();i++){
    place[station[i]] = i;
  }
  while(cin>>n,n){
    string str;
    for(int i = 0;i < n;i++){
      cin>>a[i];
    }
    cin>>str;
    string ans ="";
    int pos = 0;
    for(int i = 0;i < str.length();i++){
      char c;
      int x = place[str[i]];
      if(x - a[pos] >= 0){
	ans += station[x - a[pos]];
      }else{
	ans += station[station.length() + (x - a[pos])];
      }
      pos =(pos + 1)%n;
    }
    cout <<ans<<endl;

  }
return 0;
}