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

int main(){
	char inputString[80],outputString[80], hoge[2];
	char str;//êIÉê¶ªf[^ðÛ·éÏ
	int length,count,push,index,dataSet;
	int p[9][5] = { //e{^ðµ½Æ«ÌÏÚð ç©¶ßpÓ(óÌvfÍ@É·é)
		{'.' , ',' , '!' , '?' , ' '},
		{'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' , '@'},
	}; 
	scanf("%d", &dataSet);//ßÉf[^ZbgðüÍ

	for(int i=0 ; i<dataSet ; i++){//f[^ZbgÌ¾¯üÍ³¹é
		//ÏÌú»
		count = 0;
		index = 0;
		push  = 0;
		str   = 0;

		scanf("%s", inputString);//0-9Ì¶ÌÀÑüÍ

		length = strlen( inputString );//üÍ¶Ì·³ðßé
		
		for(int i=0 ; i<length ; i++){//ê¶¸Â¶Ì·³ª¾¯²×é

			//¶ðlÉÏ··é(Ï·µ½0-9ª»ÌÜÜµ½{^ÉÎ)
			hoge[0] = inputString[i];
			push = atoi(hoge);

			if(push==0){//mè{^:0¾Á½ç
				count = 0;
				if(str!=0){
					//êIÉÛ¶µÄ¢½¶ð¦ÉÇÁ
					outputString[index] = str;
					outputString[index+1] = '\0';
					str = 0;
					index++;
				}
			}
			else{//0ÈOÌ{^¾Á½ç

				//êIÉ»ÝÌ¶ðÛ¶
				str = p[push-1][count];
				//{^ðµ½ñðâ·
				count++;
				if(p[push-1][count]=='@' || count==5){
					count = 0;//{^ðµ½ñð0É·é
				}
			}
		}

		//¦Ì¶ñoÍ
		printf("%s \n", outputString );
	}

	return 0;
}