#C6085. Taco Message Encoding

    ID: 49806 Type: Default 1000ms 256MiB

Taco Message Encoding

Taco Message Encoding

You are given a lowercase alphabetical string S and a list of shift values. The task is to encode the message by shifting each character in S by the corresponding integer in the shift list. The shift is cyclic, i.e., after z comes a. Formally, if a character c is shifted by s positions, its new character is given by:

\( c' = \text{chr}(((\text{ord}(c) - \text{ord}('a') + s) \mod 26) + \text{ord}('a')) \)

Process each test case independently.

inputFormat

The input is read from standard input (stdin) and is formatted as follows:

  1. An integer T representing the number of test cases.
  2. For each test case:
    1. A line containing the string S, consisting of lowercase letters.
    2. A line containing n space-separated integers representing the shift values. It is guaranteed that the number of integers equals the length of S.

outputFormat

For each test case, output the encoded message on a new line to standard output (stdout).

## sample
1
abcdef
1 2 3 4 5 6
bdfhjl

</p>