#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#define P(type,x) fprintf(stdout,"%"#type"\n",x)
#define S(type,x) fscanf(stdin,"%"#type,&x)
//#define MAX(a,b) a>b?a:b
//#define MIN(a,b) a<b?a:b

const char code[10][10] = { "",".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz" };

int main() {
	int c = 0, a, n, i,f;
	char input[10001], *p;
	S(d, n),getchar();
	for (i=0;i<n;i++,puts("")) {
		fscanf(stdin, "%[^\n]*s", input);
		getchar();
		p = input;
		c = 0;
		while (*p) {
			if (*(p + 1) != *p) {
				if (*p == '1') a = 5;
				else if (*p == '7' || *p == '9') a = 4;
				else a = 3;
				if (*p != '0') fprintf(stdout, "%c", code[*p - '0'][c%a]);
				c = 0;
			}
			else c++;
			p++;
		}
	}
	return 0;
}