#include<stdio.h>
#include<string.h>
int N,l,m;
char S[1026],*p,C[11][9]={"",".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};
int main()
{
	for(scanf("%d\n",&N);N--;)
	{
		gets(S);
		for(p=strtok(S,"0");p;p=strtok(0,"0"))
		{
			l=strlen(p);
			m=p[0]=='1'?5:p[0]=='7'||p[0]=='9'?4:3;
			if(l!=0)
				putchar(C[p[0]-48][(l-1)%m]);
		}
		puts("");
	}
	return 0;
}