#include <iostream>

using namespace std;

char solve(int x,int y,int z,int u,int v){
    if (x == 1 && y == 0 && z == 0 && u == 1 && v == 0){
        return 'a';
    }
    if (x == 1 && y == 1 && z == 0 && u == 2 && v == 0){
        return 'b';
    }
    if (x == 2 && y == 0 && z == 0 && u == 1 && v == 1){
        return 'c';
    }
    if (x == 2 && y == 1 && z == 0 && u == 1 && v == 2){
        return 'd';
    }
    if (x == 1 && y == 1 && z == 0 && u == 1 && v == 1){
        return 'e';
    }
    if (x == 2 && y == 1 && z == 0 && u == 2 && v == 1){
        return 'f';
    }
    if (x == 2 && y == 2 && z == 0 && u == 2 && v == 2){
        return 'g';
    }
    if (x == 1 && y == 2 && z == 0 && u == 2 && v == 1){
        return 'h';
    }
    if (x == 1 && y == 1 && z == 0 && u == 1 && v == 1){
        return 'i';
    }
    if (x == 1 && y == 2 && z == 0 && u == 1 && v == 2){
        return 'j';
    }
    if (z == 1){
        //w is special
        if (x == 1 && y == 2 && z == 1 && u == 1 && v == 3){
            return 'w';
        }
        return solve(x,y,0,u-1,v) + 10;
    }
    char ind = solve(x,y,0,u-1,v-1);
    if (ind  == 'a' || ind == 'b') return ind + 20;
    if (ind >= 'c') return ind + 21;
}

int main(){
    int t;
    cin >> t;
    while (t--){
        int x,y,z,u,v;
        cin >> x >> y >> z >> u >>v;
        cout << solve(x,y,z,u,v);
    }
    cout << endl;
    return 0;
}

### Prompt

Develop a solution in CPP to the problem described below:



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

### Response

```cpp
#include <iostream>

using namespace std;

char solve(int x,int y,int z,int u,int v){
    if (x == 1 && y == 0 && z == 0 && u == 1 && v == 0){
        return 'a';
    }
    if (x == 1 && y == 1 && z == 0 && u == 2 && v == 0){
        return 'b';
    }
    if (x == 2 && y == 0 && z == 0 && u == 1 && v == 1){
        return 'c';
    }
    if (x == 2 && y == 1 && z == 0 && u == 1 && v == 2){
        return 'd';
    }
    if (x == 1 && y == 1 && z == 0 && u == 1 && v == 1){
        return 'e';
    }
    if (x == 2 && y == 1 && z == 0 && u == 2 && v == 1){
        return 'f';
    }
    if (x == 2 && y == 2 && z == 0 && u == 2 && v == 2){
        return 'g';
    }
    if (x == 1 && y == 2 && z == 0 && u == 2 && v == 1){
        return 'h';
    }
    if (x == 1 && y == 1 && z == 0 && u == 1 && v == 1){
        return 'i';
    }
    if (x == 1 && y == 2 && z == 0 && u == 1 && v == 2){
        return 'j';
    }
    if (z == 1){
        //w is special
        if (x == 1 && y == 2 && z == 1 && u == 1 && v == 3){
            return 'w';
        }
        return solve(x,y,0,u-1,v) + 10;
    }
    char ind = solve(x,y,0,u-1,v-1);
    if (ind  == 'a' || ind == 'b') return ind + 20;
    if (ind >= 'c') return ind + 21;
}

int main(){
    int t;
    cin >> t;
    while (t--){
        int x,y,z,u,v;
        cin >> x >> y >> z >> u >>v;
        cout << solve(x,y,z,u,v);
    }
    cout << endl;
    return 0;
}

```