t=int(input())
for j in range (t):
k=int(input())
L=input()
A=''
i=0
while i<k:
if i<k-1:
if (int(L[i+1])!=0):
if i<k-2:
if int(L[i+2])!=0:
b=chr(96+int(L[i]))
A=A+b
i=i+1
else:
if i<k-3:
if int(L[i+3])!=0:
b=chr(96+(10*int(L[i])+int(L[i+1])))
A=A+b
i=i+3
else:
b=chr(96+int(L[i]))
A=A+b
i=i+1
else:
b=chr(96+(10*int(L[i])+int(L[i+1])))
A=A+b
i=i+3
else:
b=chr(96+int(L[i]))
A=A+b
i+=1
else:
if i<k-2:
if int(L[i+2])!=0:
b=chr(96+int(L[i]))
A=A+b
i=i+1
else:
if i<k-3:
if int(L[i+3])!=0:
b=chr(96+(10*int(L[i])+int(L[i+1])))
A=A+b
i=i+3
else:
b=chr(96+int(L[i]))
A=A+b
i=i+1
else:
b=chr(96+(10*int(L[i])+int(L[i+1])))
A=A+b
i=i+3
else:
b=chr(96+int(L[i]))
A=A+b
i+=1
elif L[k-1]!=0:
b=chr(96+int(L[i]))
A=A+b
i+=1
else:
i+=1
print(A)
//BISMILLAHIR RAHMANIR RAHIM
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long llu;
typedef long double ld;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<double> vd;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int,int> pii;
typedef pair<ll, ll> pll;
typedef pair<double,double> pdd;
typedef vector<pii> vpi;
typedef vector<pll> vpl;
typedef vector<pdd> vpd;
#define fr(n) for(int i=0;i<n;i++)
#define fr1(n) for(int i=1;i<=n;i++)
#define frr(n) for(int i=n;i>0;i--)
#define frr1(n) for(int i=n;i>=0;i--)
#define pb push_back
#define pf push_front
#define epb emplace_back
#define epf emplace_front
#define pob pop_back
#define pof pop_front
#define ins insert
#define rev reverse
#define mp make_pair
#define um unordered_multiset
#define us unordered_set
#define lb lower_bound
#define ub upper_bound
#define ff first
#define ss second
#define bb break
#define cc continue
#define el "\n"
#define r0 return 0
#define kase int tc; cin>>tc; for(int z=1;z<=tc;z++)
#define case_print cout<<"Case "<<z<<": "
#define dcml(x) cout<<fixed<<setprecision(x)
#define sz(x) (int )x.size()
#define ele(arr) sizeof(arr)/sizeof(arr[0])
#define all(x) (x).begin(),(x).end()
#define allr(x) (x).rbegin(), (x).rend()
#define alla(x,sz) (x),(x+sz)
#define sortd(x) sort(all(x), greater<int>())
#define sortda(x,sz) sort(alla(x,sz), greater<int>())
#define make_unique(x) sort(all(x)); (x).erase(unique(all(x)) ,(x).end());
#define sqr(x) ((ll)(x)*(x))
#define pqmin(x) priority_queue<x, vector<x>, greater< x > >
#define pq(x) priority_queue<x>
#define maxe *max_element
#define mine *min_element
#define Sum(x) accumulate(all(x),0)
#define bs binary_search
#define mem(x,y) memset(x,y,sizeof(x))
#define memclr(x,y) memset(x,0,sizeof(x))
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) ((a)*((b)/gcd(a,b)))
#define mod 1000000007
#define err 1e-9
#define pi (2*acos ( 0 ) )
#define PI 3.141592653589793
#define optimize() ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define FILE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
int nxt()
{
int x;
cin>>x;
return x;
}
long long lxt()
{
long long x;
cin>>x;
return x;
}
double dxt()
{
double x;
cin>>x;
return x;
}
long double ldxt()
{
long double x;
cin>>x;
return x;
}
bool cmp(const pair<int, int> &p, const pair<int, int> &q)
{
if(p.first<q.first) return 1;
else if(p.first == q.first) return (p.second <q.second);
else
return 0;
//AA
}
int main()
{
// FILE
optimize()
kase{
int len = nxt();
vector<char>v;
string s;
cin>>s;
for(int i = len-1; i>=0; i--){
if(s[i] == '0'){
int x = s[i-1] -48;
int y = s[i-2] -48;
int n = y*10 +x;
char c = 96+n;
v.epb(c);
i-=2;
}
else{
int x = s[i] -48;
char ck = x+96;
v.emplace_back(ck);
}
}
reverse(all(v));
for(auto u : v){
cout<<u;
}
cout<<el;
}
r0;
}
78A - Haiku | 1287A - Angry Students |
1428A - Box is Pull | 234B - Reading |
581B - Luxurious Houses | 1481C - Fence Painting |
935A - Fafa and his Company | 22A - Second Order Statistics |
1720B - Interesting Sum | 1720A - Burenka Plays with Fractions |
3A - Shortest path of the king | 1720C - Corners |
574A - Bear and Elections | 352B - Jeff and Periods |
1244A - Pens and Pencils | 1670A - Prof Slim |
1189A - Keanu Reeves | 678A - Johny Likes Numbers |
1699C - The Third Problem | 1697D - Guess The String |
754B - Ilya and tic-tac-toe game | 760A - Petr and a calendar |
1573A - Countdown | 166A - Rank List |
1631B - Fun with Even Subarrays | 727A - Transformation from A to B |
822B - Crossword solving | 1623A - Robot Cleaner |
884B - Japanese Crosswords Strike Back | 862B - Mahmoud and Ehab and the bipartiteness |