stations = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
while true
    n = gets.to_i
    break if n == 0

    arr = gets.chomp.split.map(&:to_i)
    str = gets.chomp.split("")

    i = 0
    str.each{|c|
        print(stations[stations.index(c) - arr[i]])
        i = (i + 1) % arr.length
    }
    puts
end
