#include <stdio.h>
#include <string.h>
int main(void){
  int n,i,t,c,num[10]={1,5,3,3,3,3,3,4,3,4};
  char s[1025];
  char m[10][5]={{""},{' ','.',',','!','?'},{'c','a','b'},{'f','d','e'},{'i','g','h'},{'l','j','k'},{'o','m','n'},{'s','p','q','r'},{'v','t','u'},{'z','w','x','y'}};
  scanf("%d",&n);
  while(n--){
    scanf("%s",s);
    c=t=0;
    for(i=0;i<strlen(s);i++){
      if('1'<=s[i]&&s[i]<='9'){
	t=s[i]-'0';
	do{
	  c++;
	  i++;
	}while(s[i-1]==s[i]);
      }
      if(s[i]=='0'){
	putchar(m[t][c%num[t]]);
	c=t=0;
      }
    }
    puts("");
  }
  return 0;
}