

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
import java.io.*;
import java.util.*;
public class G_EncodedMessage {
	public static void main(String[] args)throws IOException {
		String list[]=new String[26+1];
		for(int i=1;i<=26;i++){
			String s=new String();
			switch(i){
				case 1: s="10010";break;
				case 2: s="11020";break;
				case 3: s="20011";break;
				case 4: s="21012";break;
				case 5: s="11011";break;
				case 6: s="21021";break;
				case 7: s="22022";break;
				case 8: s="12021";break;
				case 9: s="*";break;
				case 10: s="12012";break;
				case 11: s="10120";break;
				case 12: s="11130";break;
				case 13: s="20121";break;
				case 14: s="21122";break;
				case 15: s="11121";break;
				case 16: s="21131";break;
				case 17: s="22132";break;
				case 18: s="12131";break;
				case 19: s="*";break;
				case 20: s="12122";break;
				case 21: s="10221";break;
				case 22: s="11231";break;
				case 23: s="12113";break;
				case 24: s="20222";break;
				case 25: s="21223";break;
				case 26: s="11222";break;
			}
			list[i]=s;
		}
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String res=new String();
		int n=Integer.parseInt(br.readLine());
		for(int i=0;i<n;i++) {
			String s= new String();
			StringTokenizer st = new StringTokenizer(br.readLine().trim());
			for(int j=0;j<5;j++) {
				s+=st.nextToken();
			}
			int index=96;
			for(int k=1;k<=26;k++) {
				int flag=list[k].compareTo(s);
				if(flag==0) {
					index+=k;
					break;
				}
			}
			char c=(char)index;
			res+=c;
		}
		System.out.println(res);
	}
}
