#include <stdio.h>
#include <string.h>

int main(void){
  int i,j,n,lw,lb;
  char s[1028],*w,*p;
  char b[9][6]={".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};

  scanf("%d",&n);
  while(n--){
    scanf("%s",s);
    p = s;
    for(i=0;;i++){
      if((w = strtok(p,"0")) == NULL) break;
      p = NULL;

      j = *w - '1';
      lw = strlen(w);
      lb = strlen(b[j]);
      if(lw<=lb){
	printf("%c",b[j][lw-1]);
      }
      else{
	printf("%c",b[j][lw%lb-1]);
      }
    }
    printf("\n");
  }


  return 0;
}