

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
l = ['100000',
'101000',
'110000',
'110100',
'100100',
'111000',
'111100',
'101100',
'011000',
'011100',
'100010',
'101010',
'110010',
'110110',
'100110',
'111010',
'111110',
'101110',
'011010',
'011110',
'100011',
'101011',
'011101',
'110011',
'110111',
'100111',]
l = [[int(x) for x in st] for st in l]
n = int(input())
for _ in range(n):
    x, y, z, a, b = map(int, input().split())
    for idx, t in enumerate(l):
        if t[0] + t[1] == x and t[2] + t[3] == y and t[4] + t[5] == z and t[0] + t[2] + t[4] == a and t[1] + t[3] + t[5] == b:
            print(chr(97 + idx), end='')
            break
print()