loop do
  n = gets.chomp.to_i
  break if n == 0

  keys = gets.chomp.split(' ').map(&:to_i)
  station_list = ('a'..'z').to_a + ('A'..'Z').to_a

  enc_stations = gets.chomp
  dec_stations = ''

  enc_stations.size.times do |i|
    pos = station_list.index(enc_stations[i])
    dec_stations << station_list[pos - keys[i % keys.size]]
  end

  puts dec_stations
end