#include <bits/stdc++.h>
#define F first
#define S second
#define rep(i, a, b) for(int i = (a); i < (b); ++i)
#define per(i, a, b) for(int i = (b)-1; i >= (a); --i)
#define bck(i, a, b) if ((i) >= (a) && (i) < (b))
#define trav(x, a) for (auto &x : (a))
#define sz(a) (int)(a).size()
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define pb push_back
#define eb emplace_back
using namespace std;
typedef long long ll;
typedef string str;
template<typename T> using vec = vector<T>;
template<typename T> using pq = priority_queue<T, vector<T>, std::greater<T>>;
template<typename T> using mxpq = priority_queue<T>;
typedef pair<int,int> pii;
typedef vec<int> vi;
typedef vec<pii> vii;
typedef vec<vi> vvi;
typedef pair<ll,ll> pll;
typedef vec<ll> vl;
typedef vec<pll> vll;
typedef vec<vl> vvl;
template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }
template<typename A, typename B>
istream& operator>>(istream& s, pair<A,B>& p) { return s>>p.first>>p.second; }
template<typename T>
istream& operator>>(istream& s, vec<T>& p) {
    for (T& t : p) s >> t;
    return s;
}

int main() {
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    map<array<int, 5>, char> m;
    m[{1,1,2,2,2}] = 'z';
    m[{2,1,2,2,3}] = 'y';
    m[{2,0,2,2,2}] = 'x';
    m[{1,2,1,1,3}] = 'w';
    m[{1,1,2,3,1}] = 'v';
    m[{1,0,2,2,1}] = 'u';
    m[{1,2,1,2,2}] = 't';
    m[{1,1,1,2,1}] = 's';
    m[{1,2,1,3,1}] = 'r';
    m[{2,2,1,3,2}] = 'q';
    m[{2,1,1,3,1}] = 'p';
    m[{1,1,1,2,1}] = 'o';
    m[{2,1,1,2,2}] = 'n';
    m[{2,0,1,2,1}] = 'm';
    m[{1,1,1,3,0}] = 'l';
    m[{1,0,1,2,0}] = 'k';
    m[{1,2,0,1,2}] = 'j';
    m[{1,1,0,1,1}] = 'i';
    m[{1,2,0,2,1}] = 'h';
    m[{2,2,0,2,2}] = 'g';
    m[{2,1,0,2,1}] = 'f';
    m[{1,1,0,1,1}] = 'e';
    m[{2,1,0,1,2}] = 'd';
    m[{2,0,0,1,1}] = 'c';
    m[{1,1,0,2,0}] = 'b';
    m[{1,0,0,1,0}] = 'a';


    int n; cin >> n;
    rep(i, 0, n) {
        array<int, 5> a; rep(i,0,5)cin>>a[i];
        cout << m[a];
    }
    cout<<endl;
}
