#include<stdio.h>
#include<algorithm>
using namespace std;
char str[110];
int b[110];
int main(){
	int a;
	while(scanf("%d",&a),a){
		for(int i=0;i<a;i++)scanf("%d",b+i);
		scanf("%s",str);
		for(int i=0;str[i];i++){
			int p=0;
			if('a'<=str[i]&&str[i]<='z')p=str[i]-'a';
			else p=str[i]-'A'+26;
			p-=b[i%a];
			if(p<0)p+=52;
			if(p<26)str[i]='a'+p;
			else str[i]='A'+p-26;
		}
		printf("%s\n",str);
	}
}
#include <iostream>
#include <string>
using namespace std;

char byte_minus(char ch, int num)
{
  if ( 97 <= ch && ch <= 122 )
  {
    if ( ch - 97 >= num )
    {
      return ch - num;
    }
    else
    {
      return byte_minus('Z', num - (ch - 96) );
    }
  }
  else
  {
    if ( ch - 65 >= num )
    {
      return ch - num;
    }
    else
    {
      return byte_minus('z', num - (ch - 64) );
    }
  }
}

int main()
{
  while (true)
  {
    int n;
    cin >> n;
    if ( n == 0 ) break;
    int* keys = new int[n];
    for (int i = 0; i < n; i++)
    {
      cin >> keys[i];
    }
    string cipher;
    //getline(cin, cipher);
    cin >> cipher;
    for (int i = 0, size = cipher.length(); i < size; i++)
    {
      int key_index = i % n;
      char result = byte_minus(cipher[i], keys[key_index]);
      cout << result;
    }
    cout << endl;
  }
  return 0;
}