#include <iostream>
#include <vector>
#include <string>
using namespace std;

const vector<char> ss = {'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  ()
{
    int n;
    while (cin >> n, n) {
        vector<int> v(n);
        for (auto &i : v) cin >> i;
        string str;
        cin >> str;
        for (int i = 0; i < str.size(); i++) {
            int t = (str[i] - (('a' <= str[i] && str[i] <= 'z') ? 'a' : ('A' - 26)) - v[i % n] + 52) % 52;
            cout << ss[t];
        }
        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;
}