Problem: 

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

Solution (in PYTHON3):

Solution:

t = {
    1: 0,
    5: 1,
    3: 2,
    11: 3,
    9: 4,
    7: 5,
    15: 6,
    13: 7,
    # 6: 8,
    14: 9,

    1 + 16: 10,
    5 + 16: 11,
    3 + 16: 12,
    11 + 16: 13,
    9 + 16: 14,
    7 + 16: 15,
    15 + 16: 16,
    13 + 16: 17,
    # 6 + 16: 18,
    14 + 16: 19,

    1 + 48: 20,
    5 + 48: 21,
    3 + 48: 23,
    11 + 48: 24,
    9 + 48: 25,
    
    46: 22,
}

def c(v, h, n):
    return v == [
        bool(n&(1<<0)) + bool(n&(1<<1)),
        bool(n&(1<<2)) + bool(n&(1<<3)),
        bool(n&(1<<4)) + bool(n&(1<<5)),
    ] and h == [
        bool(n&(1<<0)) + bool(n&(1<<2)) + bool(n&(1<<4)),
        bool(n&(1<<1)) + bool(n&(1<<3)) + bool(n&(1<<5)),
    ]

def solve(s):
    s = [ord(c) - ord('0') for c in s]
    v = [s[0], s[2], s[4]]
    h = [s[6], s[8]]

    for n in range(64):
        if c(v, h, n) and n in t:
            break
    else:
        print('wtf')
    return chr(t[n] + ord('a'))

n = int(input())
s = ''
for _ in range(n):
    s += solve(input())
print(s)