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

Solution:
import java.io.*;
import java.nio.CharBuffer;
import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;

public class P1505G {

    private static final int[][][] BRAILLES = new int[][][]
            {
                    {
                            {1, 0},
                            {0, 0},
                            {0, 0}
                    },//a
                    {
                            {1, 0},
                            {1, 0},
                            {0, 0}
                    },//b
                    {
                            {1, 1},
                            {0, 0},
                            {0, 0}
                    },//c
                    {
                            {1, 1},
                            {0, 1},
                            {0, 0}
                    },//d
                    {
                            {1, 0},
                            {0, 1},
                            {0, 0}
                    },//e
                    {
                            {1, 1},
                            {1, 0},
                            {0, 0}
                    },//f
                    {
                            {1, 1},
                            {1, 1},
                            {0, 0}
                    },//g
                    {
                            {1, 0},
                            {1, 1},
                            {0, 0}
                    },//h
                    {
                            {0, 1},
                            {1, 0},
                            {0, 0}
                    },//i
                    {
                            {0, 1},
                            {1, 1},
                            {0, 0}
                    },//j
                    {
                            {1, 0},
                            {0, 0},
                            {1, 0}
                    },//k
                    {
                            {1, 0},
                            {1, 0},
                            {1, 0}
                    },//l
                    {
                            {1, 1},
                            {0, 0},
                            {1, 0}
                    },//m
                    {
                            {1, 1},
                            {0, 1},
                            {1, 0}
                    },//n
                    {
                            {1, 0},
                            {0, 1},
                            {1, 0}
                    },//o
                    {
                            {1, 1},
                            {1, 0},
                            {1, 0}
                    },//p
                    {
                            {1, 1},
                            {1, 1},
                            {1, 0}
                    },//q
                    {
                            {1, 0},
                            {1, 1},
                            {1, 0}
                    },//r
                    {
                            {0, 1},
                            {1, 0},
                            {1, 0}
                    },//s
                    {
                            {0, 1},
                            {1, 1},
                            {1, 0}
                    },//t
                    {
                            {1, 0},
                            {0, 0},
                            {1, 1}
                    },//u
                    {
                            {1, 0},
                            {1, 0},
                            {1, 1}
                    },//v
                    {
                            {0, 1},
                            {1, 1},
                            {0, 1}
                    },//w
                    {
                            {1, 1},
                            {0, 0},
                            {1, 1}
                    },//x
                    {
                            {1, 1},
                            {0, 1},
                            {1, 1}
                    },//y
                    {
                            {1, 0},
                            {0, 1},
                            {1, 1}
                    },//z
            };

    public static void main(String[] args) {
        SimpleScanner scanner = new SimpleScanner(System.in);
        PrintWriter writer = new PrintWriter(System.out);

        int n = scanner.nextInt();
        while (n-- > 0) {
            int[] r = new int[3];
            int[] c = new int[2];
            for (int i = 0; i < 3; ++i)
                r[i] = scanner.nextInt();
            for (int i = 0; i < 2; ++i)
                c[i] = scanner.nextInt();
            for (int i = 0; i < 26; ++i) {
                if (cntSame(BRAILLES[i], r, c)) {
                    writer.print((char) ('a' + i));
                    break;
                }
            }
        }
        writer.println();

        writer.close();
    }

    private static boolean cntSame(int[][] braille, int[] r0, int[] c0) {
        int[] r = new int[3];
        int[] c = new int[2];
        for (int i = 0; i < 3; ++i)
            for (int j = 0; j < 2; ++j) {
                r[i] += braille[i][j];
                c[j] += braille[i][j];
            }
        return Arrays.equals(r, r0) && Arrays.equals(c, c0);
    }

    private static void search(int k, int[] x, List<int[]> result) {
        if (k == 5) {
            if (x[0] + x[1] == x[2] + x[3] + x[4])
                result.add(Arrays.copyOf(x, 5));
            return;
        }
        for (int i = 0; i <= (k < 2 ? 3 : 2); ++i) {
            x[k] = i;
            search(k + 1, x, result);
        }
    }

    private static class SimpleScanner {

        private static final int BUFFER_SIZE = 10240;

        private Readable in;
        private CharBuffer buffer;
        private boolean eof;

        private SimpleScanner(InputStream in) {
            this.in = new BufferedReader(new InputStreamReader(in));
            buffer = CharBuffer.allocate(BUFFER_SIZE);
            buffer.limit(0);
            eof = false;
        }


        private char read() {
            if (!buffer.hasRemaining()) {
                buffer.clear();
                int n;
                try {
                    n = in.read(buffer);
                } catch (IOException e) {
                    n = -1;
                }
                if (n <= 0) {
                    eof = true;
                    return '\0';
                }
                buffer.flip();
            }
            return buffer.get();
        }

        private void checkEof() {
            if (eof)
                throw new NoSuchElementException();
        }

        private char nextChar() {
            checkEof();
            char b = read();
            checkEof();
            return b;
        }

        private String next() {
            char b;
            do {
                b = read();
                checkEof();
            } while (Character.isWhitespace(b));
            StringBuilder sb = new StringBuilder();
            do {
                sb.append(b);
                b = read();
            } while (!eof && !Character.isWhitespace(b));
            return sb.toString();
        }

        private int nextInt() {
            return Integer.parseInt(next());
        }

        private long nextLong() {
            return Long.parseLong(next());
        }

        private double nextDouble() {
            return Double.parseDouble(next());
        }
    }
}