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

const string alphas = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
const int length = alphas.size();

char cipher(char c, int x) {
  return alphas[(alphas.find(c, 0) + length + x) % length];
}

int main() {
  int n;
  while (cin >> n && n) {
    vector<int> keys(n);
    for (int i = 0; i < n; i++) {
      cin >> keys[i];
    }
    string s;
    cin >> s;
    for (int i = 0, len = s.size(); i < len; i++) {
      cout << cipher(s[i], -keys[i % n]);
    }
    cout << endl;
  }
}