#include<iostream>
#include<string>
using namespace std;
int main(){
  int n;
  while(cin>>n,n){
    int key[100];
    string a;
    for(int i=0;i<n;i++)cin>>key[i];
    cin>>a;
    for(int i=0;i<a.size();i++){
      if(a[i]>='a'){
        if(a[i]-key[i%n]<'a')a[i]-=('a'-'Z')+key[i%n]-1;
        else a[i]-=key[i%n];
        if(a[i]<'A')a[i]+=('z'-'A')+1;
        }else{
        if(a[i]-key[i%n]<'A'){
          a[i]-=-('z'-'A')+key[i%n]-1;
          if(a[i]<'a')a[i]-=('a'-'Z')-1;
        }
        else a[i]-=key[i%n];
        }
    }
    cout<<a<<endl;;
  }
  return 0;
}