#include<iostream>
#include<vector>
#include<string>

using namespace std;

string narabi = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
int convert(char c) {
	if (c >= 'a' && c <= 'z')return c - 'a';
	else return c - 'A' + 26;
}

int main() {
	int N;
	while (cin >> N, N != 0) {
		vector<int> rolling;
		for (int i = 0; i < N; i++) {
			int a;
			cin >> a;
			rolling.push_back(a);
		}

		string ans = "";
		string input;
		cin >> input;
		for (int i = 0; i < input.size(); i++) {
			ans += narabi[(convert(input[i]) - rolling[i % rolling.size()] + 52) % 52];
		}
		cout << ans << endl;
	}
	return 0;
}
