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

int main(){
  char keitai[10][5],r[2000];
  int tes,i,cnt,temp;

  strcpy( keitai[1], ".,!? " );
  strcpy( keitai[2], "abc" );
  strcpy( keitai[3], "def" );
  strcpy( keitai[4], "ghi" );
  strcpy( keitai[5], "jkl" );
  strcpy( keitai[6], "mno" );
  strcpy( keitai[7], "pqrs" );
  strcpy( keitai[8], "tuv" );
  strcpy( keitai[9], "wxyz" );

  scanf("%d",&tes);

  while(tes--){
    scanf("%s",r);
    cnt = 0;
    temp = 0;
    for(i = 0;i < strlen(r);i++ ){
      if(r[i] == '0'){
        if(temp != 0){
          printf("%c",keitai[temp][(cnt % strlen(keitai[temp]))-1]);
        }
        cnt = 0;
        temp = 0;
      }
      else{
        cnt++;
        temp = r[i] - '0';
      }
    }
    printf("\n");
  }

  return 0;

}