#include<stdio.h>
#include<string.h>
int main(void)
{
	char *num[]={"0",".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};
	int push_count=0,charcount=0,i,k,s,N;
	char str[100]={0},x[1026],a[10];

	scanf("%d",&N);
	fgets(a,sizeof(a),stdin);
	for(i=0;i<N;i++){
		fgets(x,sizeof(x),stdin);
		
		for(k=0;x[k]!='\n';k++){
			
			if(x[k]=='1'){
				for(s=k+1;x[s]==x[k];s++){
					push_count++;
					if(push_count==5)push_count=0;
				}
				k=s;
				str[charcount++]=num[x[k-1]-'0'][push_count];
				push_count=0;
			}
			else if(x[k]=='9' || x[k]=='7'){
				for(s=k+1;x[s]==x[k];s++){
					push_count++;
					if(push_count==4)push_count=0;
				}
				k=s;
				str[charcount++]=num[x[k-1]-'0'][push_count];
				push_count=0;
			}
			else if(x[k]!='0'){
				for(s=k+1;x[s]==x[k];s++){
					push_count++;
					if(push_count==3)push_count=0;
				}
				k=s;
				str[charcount++]=num[x[k-1]-'0'][push_count];
				push_count=0;
			}
		}
		printf(str);
		putchar('\n');
		memset(str,0,sizeof(str));
		charcount=0;
	}

	return 0;
}