#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<ll> vl;

ll n;
string s;
ll dic[52];
ll undic[128];


int main(){
  for(ll i = 0;i < 26;i++){
    dic[i] = ('a'+i);
    undic[('a'+i)] = i;
  }
  for(ll i = 0;i < 26;i++){
    dic[i+26] = ('A'+i);
    undic[('A'+i)] = i+26;
  }
  while(cin >> n){
    if(n == 0) return 0;
    vl k = vl(n);
    for(ll i = 0;i < n;i++) cin >> k[i];
    cin >> s;
    string ans;
    for(ll i = 0;i < s.size();i++){
      ll idx = undic[s[i]];
      idx = (idx-k[i%k.size()]+52)%52;
      char c = dic[idx];
      ans.push_back(c);
    }
    cout << ans << endl;

  }
}

