#include<stdio.h>
#include<string.h>
#include<stdlib.h>


int main(void){
	char in[1026],o[76]={""};
	char t,*p;
	int ii,i,l,a,b,f,c,e,n;
	char s[9][5]={".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};

	

	scanf("%d",&n);
	
	for(ii=0;ii<n;ii++){
		scanf("%s",in);
		t='0';
		c=0;
		for(i=0;(unsigned int)i<strlen(in);i++){
			if(t=='0' && in[i]=='0')continue;
			else if(t!='0' && in[i]=='0'){
				f=atoi(&t);
				//printf("%c",s[f-1][(c-1)%strlen(s[f-1])]);
				o[strlen(o)]=s[f-1][(c-1)%strlen(s[f-1])];
				t='0';
				c=0;
				}
			else if(in[i]==t || (t=='0' && in[i]!='0')){
				t=in[i];
				c++;
				//printf("--%d\n",c);
			}
		}
		printf("%s\n",o);
		for(i=0;o[i]!=NULL;i++)o[i]=NULL;
	}
	
	return 0;
}
	