#include<stdio.h>
#include<stdlib.h>
#define MAXSIZE 1024
#define MAXLENGTH 76

int main(void)
{
  int i,j,c;
  int n;
  char *a,*b;

  scanf("%d ",&n);
  
  for(i=0;i<n;i++)
    {
      a = (char *)malloc(sizeof(char)*MAXLENGTH);
      b = (char *)malloc(sizeof(char)*MAXSIZE);
      gets(a);
      j = 0;
      while(1)
	{
	  if(a[j]=='\0')break;
	  c = 0;
	  while(1)
	    { 
	      if(a[j]=='0'){
		break;
	      }else{
		j++;
		c++;
	      }
	    }
	      if(a[j-1] == '1'){
	        if(c%5==1){printf(".");}
	        else if(c%5==2){printf(",");}
		else if(c%5==3){printf("!");}
		else if(c%5==4){printf("?");}
		else{printf(" ");}
	      }else if(a[j-1]=='7'){
		if(c%4==1){printf("p");}
	        else if(c%4==2){printf("q");}
		else if(c%4==3){printf("r");}
		else{printf("s");}
	      }else if(a[j-1]=='9'){
		if(c%4==1){printf("w");}
	        else if(c%4==2){printf("x");}
		else if(c%4==3){printf("y");}
		else{printf("z");}
	      }else if(a[j-1]=='2'){
		if(c%3==1){printf("a");}
	        else if(c%3==2){printf("b");}
		else{printf("c");}
	      }else if(a[j-1]=='3'){
		if(c%3==1){printf("d");}
	        else if(c%3==2){printf("e");}
		else{printf("f");}
              }else if(a[j-1]=='4'){
		if(c%3==1){printf("g");}
	        else if(c%3==2){printf("h");}
		else{printf("i");}   
	      }else if(a[j-1]=='5'){
		if(c%3==1){printf("j");}
	        else if(c%3==2){printf("k");}
		else{printf("l");}	     
	      }else if(a[j-1]=='6'){
		if(c%3==1){printf("m");}
	        else if(c%3==2){printf("n");}
		else{printf("o");}	     
	      }else if(a[j-1]=='8'){
		if(c%3==1){printf("t");}
	        else if(c%3==2){printf("u");}
		else{printf("v");}
	      }	  
	      j++;
	}
      printf("\n");
    }
  return 0;
}