#include <bits/stdc++.h>
using namespace std;

int n;
char ls[52];
string s, ans;

void solve(char c, int x);

int main() {
  int i;
  for(i = 0; i < 52; ++i) {
    if(i < 26)
      ls[i] = 'a' + i;
    else
      ls[i] = 'A' + i % 26;
  }
  while(1) {
    cin >> n;
    if(n == 0) break;
    vector<int> v;
    for(i = 0; i < n; ++i) {
      int x;
      cin >> x;
      v.push_back(x);
    }
    cin >> s;
    for(i = 0; i < s.size(); ++i) solve(s[i], v[i % v.size()]);
    cout << ans << endl;
    ans = "";
  }
  return 0;
}

void solve(char c, int x) {
  int now;
  if(c >= 'a' && c <= 'z')
    now = c - 'a';
  else
    now = c - 'A' + 26;
  ans += ls[(now - x + 52) % 52];
}
