#include <stdio.h>

int main(void) {
	const char list[10][5] = {
		{0,0,0,0,0},
		{'.',',','!','?', ' '},
		{'a','b','c',0,0},
		{'d','e','f',0,0},
		{'g','h','i',0,0},
		{'j','k','l',0,0},
		{'m','n','o',0,0},
		{'p','q','r','s',0},
		{'t','u','v',0,0},
		{'w','x','y','z',0},
	};
	char b,b2;
	int listc[10]= {5,5,3,3,3,3,3,4,3,4}, n,i;
	scanf("%d%*c", &n);
	for(i = 0; n>i; i++){
		while(1){
		int c = 0;
		b2 = '0';
		b = -1;
		while(scanf("%c", &b) != EOF){
			if(b == '0' || b == '\n') break;
			b2 = b;
			c++;
		}
		if(b == '\n' || b == -1) {
			printf("\n");
			break;
		}
		printf("%c", list[b2-'0'][(c-1)%listc[b2-'0']]);
		}
	}
	
	return 0;
}