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

int main(void)
{
	int N;
	char str[1025];
	int n, len;
	int i, p;
	char *table[] = {"",    ".,!? ", "abc",  "def", "ghi",
	                 "jkl", "mno",   "pqrs", "tuv", "wxyz"};
					 
	scanf("%d", &N);
	for (i = 0; i < N; i++){
		scanf("%s", str);
		p = 0;
		n = 0;
		len = 0;
		while (str[p] != '\0'){
			if (n == 0){
				if (str[p] != '0'){
					n = str[p] - '0';
					len++;
				}
			}
			else {
				if (str[p] == '0'){
					printf("%c", table[n][(len - 1) % strlen(table[n])]);
					n = 0;
					len = 0;
				}
				else {
					len++;
				}
			}
			p++;
		}
		printf("\n");
	}
	return (0);
}