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

////////////////////////////////////////////////////////////////////////////////
//
/////////////////////////////////////////////////////////////////////////////////
int main(void){
	int i;
	int N;
	int j;
	char c;
	int col;
	int ind;
	int cnt;
	int letter;
	char line[1025] = {0};
	char ans[80];
	char *pkey;

char *tbl[9] = {	".,!? ",
					"abc",
					"def",
					"ghi",
					"jkl",
					"mno",
					"pqrs",
					"tuv",
					"wxyz"};

	scanf("%d", &N);

	for ( j = 0 ; j < N ; j++ ) {
		memset(line, 0, sizeof(line));
		col = 0;
		ind = 0;
		cnt = 0;

		scanf("%s", line);

		for ( i = 0 ; i < sizeof(line) ; i++ ) {
			if ( (c = line[i]) == 0 ) {
				break;
			}

			letter = c - 0x30;
			if (letter == 0) {
				if (ind > 0 && cnt > 0 ) {
					pkey = tbl[ind-1];
					ans[col++] = pkey[(cnt-1)%strlen(pkey)];
				}
				ind = letter;
				cnt = 0;
			} else if (letter > 0 && letter < 10) {
				ind = letter;
				cnt++;
			}
		}
		if (col > 0) {
			printf("%.*s\n", col, ans);
		}
	}

	return 0;
}