#include <stdio.h>
#include <string.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)

char a[10][5]={
	{},
	{'.',',','!','?',' '},
	{'a','b','c'},
	{'d','e','f'},
	{'g','h','i'},
	{'j','k','l'},
	{'m','n','o'},
	{'p','q','r','s'},
	{'t','u','v'},
	{'w','x','y','z'}
};
int c[10]={0,5,3,3,3,3,3,4,3,4};

char in[1100],out[99];
int main(){
	ll q;
	scanf("%lld",&q);
	while(q--){
		scanf("%s",in);
		ll n=strlen(in);
		int outlen=0;
		int cnt=0;
		rep(i,0,n){
			if(in[i]==in[i+1])cnt++;
			else{
				int ch=in[i]-'0';
				if(ch)out[outlen++]=a[ch][cnt%c[ch]];
				cnt=0;
			}
		}
		out[outlen]=0;
		puts(out);
	}
}
