#include <bits/stdc++.h>

using namespace std;

const string ord = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

int main(void) {
  int n;
  while (cin >> n, n) {
    vector<int> k(n);
    for (int i = 0; i < n; i++) {
      cin >> k[i];
    }

    string s;
    cin >> s;

    int l = 0;
    string ans = "";
    for (int i = 0; i < s.size(); i++) {
      ans += ord[(ord.find(s[i]) - k[l] + ord.size()) % ord.size()];
      l = (l + 1) % k.size();
    }

    cout << ans << endl;
  }
  

  return 0;
}
