

Input

The first line of the input contains a single integer N (1 ≤ N ≤ 24). The next N lines contain 5 space-separated integers each. The first three integers will be between 0 and 2, inclusive. The last two integers will be between 0 and 3, inclusive. The sum of the first three integers will be equal to the sum of the last two integers.

Output

Output the result – a string of lowercase English letters.

Examples

Input


1
1 0 0 1 0


Output


a


Input


10
2 0 0 1 1
1 1 1 2 1
2 1 0 1 2
1 1 0 1 1
2 1 0 2 1
1 1 1 2 1
1 2 1 3 1
2 0 0 1 1
1 1 0 1 1
1 1 2 2 2


Output


codeforcez
code_table = {
    '100000': 'a',
    '110000': 'b',
    '100100': 'c',
    '100110': 'd',
    '100010': 'e',
    '110100': 'f',
    '110110': 'g',
    '110010': 'h',
    '010100': 'i',
    '010110': 'j',
    '101000': 'k',
    '111000': 'l',
    '101100': 'm',
    '101110': 'n',
    '101010': 'o',
    '111100': 'p',
    '111110': 'q',
    '111010': 'r',
    '011100': 's',
    '011110': 't',
    '101001': 'u',
    '111001': 'v',
    '010111': 'w',
    '101101': 'x',
    '101111': 'y',
    '101011': 'z',
}


n = int(input())

for i in range(n):
    x1, x2, x3, y1, y2 = map(int, input().split())
    for b, v in code_table.items():
        b = list(map(int, b))
        xx1 = b[0] + b[3]
        xx2 = b[1] + b[4]
        xx3 = b[2] + b[5]
        yy1 = b[0] + b[1] + b[2]
        yy2 = b[3] + b[4] + b[5]
        if (xx1 == x1 and
            xx2 == x2 and
            xx3 == x3 and
            yy1 == y1 and
            yy2 == y2):
            print(v, end='')
            break

print('')
