#include<stdio.h>

int main(){

  int datacount,k,a,b,c,i,j;
  char str[200000];
  char one[5] = {'.', ',', '!', '?', ' '};

  scanf("%d",&k);
  for(j = 0; j < k;j++){

  scanf("%s",str);
  datacount = 0;
  for(i = 0;i < 200000; i++){

    a= (int)(str[i] - '0');
    if(a != 0){
      datacount++;
    }else{
      if(i == 0) continue;
      b = (int)(str[i-1] - '0');
      switch(b){
      case 1:
	c = (datacount-1)%5;
	  printf("%c",one[c]);
	break;
      case 2:
	c = (datacount-1)%3;
	printf("%c",'a'+c);
	break;
      case 3:
	c = (datacount-1)%3;
	printf("%c",'d'+c);
	break;
      case 4:
	c = (datacount-1)%3;
	printf("%c",'g'+c);
	break;
      case 5:
	c = (datacount-1)%3;
	printf("%c",'j'+c);
	break;
      case 6:
	c = (datacount-1)%3;
	printf("%c",'m'+c);
	break;
      case 7:
	c = (datacount-1)%4;
	printf("%c",'p'+c);
	break;
      case 8:
	c = (datacount-1)%3;
	printf("%c",'t'+c);
	break;
      case 9:
	c = (datacount-1)%4;
	printf("%c",'w'+c);
	break;
      }
      datacount = 0;
    }
 
  }
   printf("\n");
  }
  return 0;
}