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


int main(){
	char numbers[3000];
	char x;
	char one[5] = {'.',',','!','?', ' '};
	char two[3] = {'a','b','c'};
	char three[3] = {'d','e','f'};
	char four[3] = {'g','h','i'};
	char five[3] = {'j','k','l'};
	char six[3] = {'m','n','o'};
	char seven[4] = {'p','q','r','s'};
	char eight[3] = {'t', 'u', 'v'};
	char nine[4] = {'w','x','y','z'};
	int n, rem_n, i=0, j=0;
	int counter = 0;
	int cases;
	scanf("%d\n", &cases);

	fgets(numbers, sizeof(numbers), stdin);
	//printf("%s", numbers);
	while(1){
		x = numbers[i++];

		while(x != '\0'){
			n = atoi(&x);
			rem_n = n;
			if(n != 0){
				while(x != '\n'){
					if(n == rem_n){
						counter++;
						//printf("counter+:%d\n",counter);
					}
					else if(x == '0'){
						switch(rem_n){
							case 1: printf("%c", one[(counter-1)%5]);
									break;
							case 2: printf("%c", two[(counter-1)%3]);
									break;
							case 3: printf("%c", three[(counter-1)%3]);
									break;
							case 4: printf("%c", four[(counter-1)%3]);
									break;
							case 5: printf("%c", five[(counter-1)%3]);
									break;
							case 6: printf("%c", six[(counter-1)%3]);
									break;
							case 7: printf("%c", seven[(counter-1)%4]);
									break;
							case 8: printf("%c", eight[(counter-1)%3]);
									break;
							case 9: printf("%c", nine[(counter-1)%4]);
									break;
						}
						counter = 0;
						x = numbers[i++];
						break;
					}
					else{
						counter = 1;					
						break;
					}
					x = numbers[i++];
					n = atoi(&x);					
				}
			}				
			else{
				x = numbers[i++];
			}
		}
		newline:
		printf("\n");
		if(++j >= cases)
			break;
		fgets(numbers, sizeof(numbers), stdin);
		i = 0;
	}
	return 0;
}