

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
#include <bits/stdc++.h>
using namespace std;

int n, cnt;
int s1, s2, s3, t1, t2;
int S[26][3], T[26][2], C[3][2];

inline void get(int a, int b, int c, int d, int e, int f)
{
	C[0][0] = a, C[0][1] = b;
	C[1][0] = c, C[1][1] = d;
	C[2][0] = e, C[2][1] = f;
	for(int i = 0; i < 3; i++)
	{
		int sum = 0;
		for(int j = 0; j < 2; j++) sum += C[i][j];
		S[cnt][i] = sum;
	}
	for(int j = 0; j < 2; j++)
	{
		int sum = 0;
		for(int i = 0; i < 3; i++) sum += C[i][j];
		T[cnt][j] = sum;
	}
	cnt ++;
}

inline void pre()
{
	get(1, 0, 0, 0, 0, 0);
	get(1, 0, 1, 0, 0, 0);
	get(1, 1, 0, 0, 0, 0);
	get(1, 1, 0, 1, 0, 0);
	get(1, 0, 0, 1, 0, 0);
	get(1, 1, 1, 0, 0, 0);
	get(1, 1, 1, 1, 0, 0);
	get(1, 0, 1, 1, 0, 0);
	get(0, 1, 1, 0, 0, 0);
	get(0, 1, 1, 1, 0, 0);
	get(1, 0, 0, 0, 1, 0);
	get(1, 0, 1, 0, 1, 0);
	get(1, 1, 0, 0, 1, 0);
	get(1, 1, 0, 1, 1, 0);
	get(1, 0, 0, 1, 1, 0);
	get(1, 1, 1, 0, 1, 0);
	get(1, 1, 1, 1, 1, 0);
	get(1, 0, 1, 1, 1, 0);
	get(0, 1, 1, 0, 1, 0);
	get(0, 1, 1, 1, 1, 0);
	get(1, 0, 0, 0, 1, 1);
	get(1, 0, 1, 0, 1, 1);
	get(0, 1, 1, 1, 0, 1);
	get(1, 1, 0, 0, 1, 1);
	get(1, 1, 0, 1, 1, 1);
	get(1, 0, 0, 1, 1, 1);
}

inline int calc()
{
	for(int i = 0; i < 26; i++)
		if(S[i][0] == s1 && S[i][1] == s2 && S[i][2] == s3 && T[i][0] == t1 && T[i][1] == t2)
			return i;
	return -1;
}

int main()
{
	scanf("%d", &n);
	pre();
	while(n --)
	{
		scanf("%d %d %d %d %d", &s1, &s2, &s3, &t1, &t2);
		putchar(calc() + 'a');
	}
	puts("");
	return 0;
}
