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

string roma = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
int main() {
	int a[100], b;
	while (cin >> b, b) {
		for (int c = 0; c < b; c++)cin >> a[c];
		string d;
		cin >> d;
		for (int e = 0; e < d.length(); e++) {
			bool p = false;
			int f = 0;
			for (; f <104; f++) {
				if (roma[f] == d[e]) {
					if (p)break;
					else p = true;
				}
			}
			f -= a[e%b];
			cout << roma[f];
		}
		cout << endl;
	}
}