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

int main(void)
{
	char List[10][6] = {".,!? ","abc","def","ghi","jkl","mno",
						"pqrs","tuv","wxyz"};
	char mozi[1205], out[76], tmp[2], o;
	int f1, c, p, oc, i, t, n;
	
	scanf("%d",&n);
	for(f1 = 1; f1 <= n; f1++)
	{
		scanf("%s",mozi);
		c = 0;
		p = 0;
		oc = 0;
		o = mozi[0];
		while(mozi[c] != '\0')
		{
				while(o == mozi[c])
				{
					c++;
					p++;
				}
				if(o == '0')
				{
					while(mozi[c] == '0' && mozi[c] != '\0')
						c++;
					o = mozi[c];
				}
				else{		
					tmp[0] = o;
					tmp[1] = '\0';
					i = atoi(tmp);
					t = strlen(List[i-1]);
					p = (p - 1) % t;
					out[oc] = List[i-1][p];
					oc++;
				}
				o = mozi[c];
				p = 0;
			}
		out[oc] = '\0';
		printf("%s\n",out);
	}
	return 0;
}