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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;

typedef tuple<int, int, int, int, int> int5;

map<int5, char> possibilities;

int main(){
    int N;
    scanf("%d", &N);

    possibilities[int5(1,0,0,1,0)] = 'a';
    possibilities[int5(1,1,0,2,0)] = 'b';
    possibilities[int5(2,0,0,1,1)] = 'c';
    possibilities[int5(2,1,0,1,2)] = 'd';
    possibilities[int5(1,1,0,1,1)] = 'e';
    possibilities[int5(2,1,0,2,1)] = 'f';
    possibilities[int5(2,2,0,2,2)] = 'g';
    possibilities[int5(1,2,0,2,1)] = 'h';
    //possibilities[int5(1,1,0,1,1)] = 'i';

    possibilities[int5(1,2,0,1,2)] = 'j';
    possibilities[int5(1,0,1,2,0)] = 'k';
    possibilities[int5(1,1,1,3,0)] = 'l';
    possibilities[int5(2,0,1,2,1)] = 'm';
    possibilities[int5(2,1,1,2,2)] = 'n';
    possibilities[int5(1,1,1,2,1)] = 'o';
    possibilities[int5(2,1,1,3,1)] = 'p';
    possibilities[int5(2,2,1,3,2)] = 'q';
    possibilities[int5(1,2,1,3,1)] = 'r';
    //possibilities[int5(1,1,1,2,1)] = 's';
    possibilities[int5(1,2,1,2,2)] = 't';
    possibilities[int5(1,0,2,2,1)] = 'u';
    possibilities[int5(1,1,2,3,1)] = 'v';
    possibilities[int5(1,2,1,1,3)] = 'w';
    possibilities[int5(2,0,2,2,2)] = 'x';
    possibilities[int5(2,1,2,2,3)] = 'y';
    possibilities[int5(1,1,2,2,2)] = 'z';

    while(N --){
        int a, b, c, d, e;
        scanf("%d%d%d%d%d", &a, &b, &c, &d, &e);
        assert(possibilities.find(int5(a, b, c, d, e)) != possibilities.end());
        putchar(possibilities[int5(a, b, c, d, e)]);
    }

    return 0;
}