#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>

#define CH(N,A,B) (A<=N&&N<B)
#define REP(i,a,b) for(int i=a;i<b;i++)
#define RREP(i,a,b) for(int i=(b-1);a<=i;i--)
#define F first
#define S second

using namespace std;
int n,key[110];
string s;
char alp[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'};

int main() {
  while(1){
    cin>>n;
    if(n==0) break;
    REP(i,0,n) cin>>key[i];
    cin>>s;
    REP(i,0,s.size()){
      int pos=-1;
      REP(j,0,52){
        if(alp[j]==s[i]){
          pos = j;
          break;
        }
      }
      cout<<alp[(pos - key[i%n] + 52*10000)%52];
    }
    cout<<endl;
  }
  return 0;
}
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

#include <functional>
#include <cassert>

typedef long long ll;
using namespace std;

#define debug(x) cerr << #x << " = " << x << endl;


#define mod 1000000007 //1e9+7(prime number)
#define INF 1000000000 //1e9
#define LLINF 2000000000000000000LL //2e18
#define SIZE 100010

bool solve(){
  int n;
  int k[SIZE];
  char c[SIZE];
  
  scanf("%d",&n);
  
  if(n == 0) return false;

  for(int i=0;i<n;i++){
    scanf("%d",k+i);
  }

  scanf("%s",c);
  
  for(int i=0;c[i]!='\0';i++){

    for(int j=0;j<k[i%n];j++){
      if(c[i] == 'a')
        c[i] = 'Z';
      else if(c[i] == 'A')
        c[i] = 'z';
      else
        c[i]--;
    }
    
  }

  printf("%s\n",c);
  
  return true;

}

int main(){

  while(solve());
  
  return 0;
}