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;
#define pb push_back
#define eb emplace_back
#define x first
#define y second
#define FOR(i, m, n) for (ll i(m); i < n; i++)
#define DWN(i, m, n) for (ll i(m); i >= n; i--)
#define REP(i, n) FOR(i, 0, n)
#define DW(i, n) DWN(i, n, 0)
#define F(n) REP(i, n)
#define FF(n) REP(j, n)
#define D(n) DW(i, n)
#define DD(n) DW(j, n)
using ll = long long;
using ld = long double;
using pll = pair<ll, ll>;
using tll = tuple<ll, ll, ll>;
using vll = vector<ll>;
using vpll = vector<pll>;
using vtll = vector<tll>;
using gr = vector<vll>;
using wgr = vector<vpll>;
void add_edge(gr&g,ll x, ll y){ g[x].pb(y);g[y].pb(x); }
void add_edge(wgr&g,ll x, ll y, ll z){ g[x].eb(y,z);g[y].eb(x,z); }
template<typename T,typename U>
ostream& operator<<(ostream& os, const pair<T,U>& p) { 
    cerr << ' ' <<  p.x << ',' << p.y; return os; }
template <typename T> 
ostream& operator<<(ostream& os, const vector<T>& v) { 
    for(auto x: v) os << ' ' <<  x; return os; }
template <typename T> 
ostream& operator<<(ostream& os, const set<T>& v) { 
    for(auto x: v) os << ' ' <<  x; return os; }
template<typename T,typename U>
ostream& operator<<(ostream& os, const map<T,U>& v) { 
    for(auto x: v) os << ' ' <<  x; return os; }
struct d_ {
    template<typename T> d_& operator,(const T& x) {
        cerr << ' ' <<  x; return *this;}
} d_t;
#define dbg(args ...) { d_t,"|",__LINE__,"|",":",args,"\n"; }
#define deb(X ...) dbg(#X, "=", X);
#define EPS (1e-10)
#define INF (1LL<<61)
#define YES(x) cout << (x ? "YES" : "NO") << endl;
#define CL(A,I) (memset(A,I,sizeof(A)))
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()

string x[] = {
"1","12","14","145","15","124","1245","125","24","245","13","123","134","1345","135","1234","12345","1235","234","2345","136","1236","2456","1346","13456","1356"
};

int main(void) {
    ios_base::sync_with_stdio(false);
    ll n; cin >> n;
    string ret;
    REP(_,n) {
        vll v(3); F(3) cin >> v[i];
        vll w(2); F(2) cin >> w[i];
        F(26) {
            vll vv(3); vll ww(2);
            for(auto c: x[i]) {
                c-='1';
                vv[c%3]++;
                ww[c/3]++;
            }
            if(v==vv && w==ww) {
                ret += 'a'+i;
                break;
            }
        }
    }
    cout << ret << endl;
    return 0;
}