#include <stdio.h>
void output(int ct,int jud){
    ct--;
	if(jud == 1){
		if(ct%5 == 0)
			printf(".");
		else if(ct%5 == 1)
			printf(",");
		else if(ct%5 == 2)
			printf("!");
		else if(ct%5 == 3)
			printf("?");
		else
			printf(" ");
	}else if(jud == 2)
		printf("%c",'a'+(ct%3));
	else if(jud == 3)
		printf("%c",'d'+(ct%3));
	else if(jud == 4)
		printf("%c",'g'+(ct%3));
	else if(jud == 5)
		printf("%c",'j'+(ct%3));
	else if(jud == 6)
		printf("%c",'m'+(ct%3));
	else if(jud == 7)
		printf("%c",'p'+(ct%4));
	else if(jud == 8)
		printf("%c",'t'+(ct%3));
	else if(jud ==9)
		printf("%c",'w'+(ct%4));
}
int main(void){
    int i;
	int n,x;
	int ct = 0,jud = 0;
	scanf("%d",&n);
    x=getchar();
    for(i=0;i<n;i++){
        while ((x = getchar()) != EOF) {
			x -= '0';
            if (x == '\n'-'0'){
                break;
            }else if(x==0){
                output(ct,jud);
                ct=0;jud=0;
            }else{
                ct++;
                jud=x;
            }
        }puts("");ct=0;jud=0;
    }
	return 0;
}
