

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
braille = [["a", "1"],
           ["b", "12"],
           ["c", "14"],
           ["d", "145"],
           ["e", "15"],
           ["f", "124"],
           ["g", "1245"],
           ["h", "125"],
           ["i", "24"],
           ["j", "245"],
           ["k", "13"],
           ["l", "123"],
           ["m", "134"],
           ["n", "1345"],
           ["o", "135"],
           ["p", "1234"],
           ["q", "12345"],
           ["r", "1235"],
           ["s", "234"],
           ["t", "2345"],
           ["u", "136"],
           ["v", "1236"],
           ["w", "2456"],
           ["x", "1346"],
           ["y", "13456"],
           ["z", "1356"]]

decoded = {}
for ch, enc in braille:
    final = [0] * 5
    
    for idx in enc:
        idx = ord(idx) - ord('1')
        r = idx % 3
        c = idx //3
        
        final[r] += 1
        final[c+3] += 1

    if tuple(final) not in decoded:
        decoded[tuple(final)] = ch

n = int(input())
ans = ""

for i in range(n):
    a, b, c, d, e = map(int, input().split())
    ans += decoded[a,b,c,d,e]
print(ans)
