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

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

  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;
    s = 0;
    for(i = 0;i < strlen(r);i++ ){
      temp = r[i] - '0';
      if(temp == 0){
        if(s != 0){
          printf("%c",keitai[s][(cnt % strlen(keitai[s]))-1]);
        }
        cnt = 0;
        s = 0;
      }
      else{
        cnt++;
        s = temp;
      }
    }
    printf("\n");
  }

  return 0;

}