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 long long ll;
typedef double db;
template<class T>inline void MAX(T &x,T y){if(y>x)x=y;}
template<class T>inline void MIN(T &x,T y){if(y<x)x=y;}
template<class T>inline void rd(T &x){
	x=0;char o,f=1;
	while(o=getchar(),o<48)if(o==45)f=-f;
	do x=(x<<3)+(x<<1)+(o^48);
	while(o=getchar(),o>47);
	x*=f;
}
string str[233];
int calc(char o,int x){
	return str[o][x]-'0';
}
int main(){
#ifndef ONLINE_JUDGE
	freopen("jiedai.in","r",stdin);
#endif
	str['a']="100000";
	str['b']="101000";
	str['c']="110000";
	str['d']="110100";
	str['e']="100100";
	str['f']="111000";
	str['g']="111100";
	str['h']="101100";
	str['i']="011000";
	str['j']="011100";
	str['k']="100010";
	str['l']="101010";
	str['m']="110010";
	str['n']="110110";
	str['o']="100110";
	str['p']="111010";
	str['q']="111110";
	str['r']="101110";
	str['s']="011010";
	str['t']="011110";
	str['u']="100011";
	str['v']="101011";
	str['w']="011101";
	str['x']="110011";
	str['y']="110111";
	str['z']="100111";
	int n,A[10];
	rd(n);
	for(int i=1;i<=n;i++){
		rd(A[1]),rd(A[2]),rd(A[3]),rd(A[4]),rd(A[5]);
		for(int o='a';o<='z';o++){
			if(calc(o,0)+calc(o,1)==A[1])
			if(calc(o,2)+calc(o,3)==A[2])
			if(calc(o,4)+calc(o,5)==A[3])
			if(calc(o,0)+calc(o,2)+calc(o,4)==A[4])
			if(calc(o,1)+calc(o,3)+calc(o,5)==A[5]){
				printf("%c",o);
				break;
			}
		}
	}
	puts("");
	return (0-0);
}