#include <bits/stdc++.h>
using namespace std;

typedef long double             ld;
typedef long long int           int64;
typedef unsigned long long int  uint64;
typedef pair<int, int>          PII;
typedef vector<int>             VI;
typedef vector<long long>       VLL;
typedef vector<PII>             VII;
typedef vector<VI>              VVI;

#define MEM(a, b)               memset(a, (b), sizeof(a))
#define clr(a)                  fill(a, 0)

#define FOR(i, j, k, in)        for (int i = (j); i < (k); i += (in))
#define FORW(i, j, k, in)       for (int i = (j); i <= (k); i += (in))
#define RFOR(i, j, k, in)       for (int i = (j); i >= (k); i -= (in))

#define all(cont)               cont.begin(), cont.end()
#define rall(cont)              cont.rbegin(), cont.rend()
#define sz(cont)                int((cont).size())
#define pb                      push_back
#define mp                      make_pair
#define fi                      first
#define se                      second

#define IINF                    0x3f3f3f3f
#define LLINF                   1000111000111000111LL
#define PI                      3.1415926535897932384626433832795

#define FastIO                  ios_base::sync_with_stdio(false); std::cin.tie(NULL); std::cout.tie(NULL);
#define hardio(name)            freopen(name".inp","r",stdin), freopen(name".out","w",stdout);
#define endl                    '\n'


int main(int argc, char* argv[]) {
    FastIO;
#ifndef ONLINE_JUDGE
    hardio("input");
#endif

    vector<int> a(26);
    a[0] = 10010; a[1] = 11020; a[2] = 20011; a[3] = 21012;
    a[4] = 11011; a[5] = 21021; a[6] = 22022; a[7] = 12021;
    a[8] = 11011; a[9] = 12012; a[10] = 10120; a[11] = 11130;
    a[12] = 20121; a[13] = 21122; a[14] = 11121; a[15] = 21131;
    a[16] = 22132; a[17] = 12131; a[18] = 11121; a[19] = 12122;
    a[20] = 10221; a[21] = 11231; a[22] = 12113; a[23] = 20222;
    a[24] = 21223; a[25] = 11222;

    int n; cin >> n;
    string s = "";
    FOR(i, 0, n, 1) {
        int cur = 0;
        FOR(j, 0, 5, 1) {
            int x; cin >> x;
            cur = cur * 10 + x;
        }
        FOR(j, 0, 26, 1) if (cur == a[j]) { s += char(j + 'a'); break; }
    }

    cout << s << endl;

    return 0;
}
