/* 
   AOJ 2006
   Keitai Message
   2015.4.25
 */

#include<stdio.h>

char one[6] = {'.', ',', '!', '?', ' ', '\0'};
char two[4] = {'a', 'b', 'c', '\0'};
char three[4] = {'d', 'e', 'f', '\0'};
char four[4] = {'g', 'h', 'i', '\0'};
char five[4] = {'j', 'k', 'l', '\0'};
char six[4] = {'m', 'n', 'o', '\0'};
char sevene[5] = {'p', 'q', 'r', 's', '\0'};
char eight[4] = {'t', 'u', 'v', '\0'};
char nine[5] = {'w', 'x', 'y', 'z', '\0'};

 
void message_analizer(char* input_str){
  char message[76];
  int i = 0, endpoint = 0, continuity_counter = 0, zero_counter = 0;
  while(input_str[i] != '\0'){
    switch(input_str[i]){
    case '0':
      zero_counter++;
      if(i == 0 || zero_counter > 1){
	break;
      }
      endpoint++;
      continuity_counter = 0;
      zero_counter = 1;
      break;
    case '1':
      message[endpoint] = one[continuity_counter % 5];
      continuity_counter++;
      zero_counter = 0;
      break;
    case '2':
      message[endpoint] = two[continuity_counter % 3];
      continuity_counter++;
      zero_counter = 0;
      break;
    case '3':
      message[endpoint] = three[continuity_counter % 3];
      continuity_counter++;
      zero_counter = 0;
      break;
    case '4':
      message[endpoint] = four[continuity_counter % 3];
      continuity_counter++;
      zero_counter = 0;
      break;
    case '5':
      message[endpoint] = five[continuity_counter % 3];
      continuity_counter++;
      zero_counter = 0;
      break;
    case '6':
      message[endpoint] = six[continuity_counter % 3];
      continuity_counter++;
      zero_counter = 0;
      break;
    case '7':
      message[endpoint] = sevene[continuity_counter % 4];
      continuity_counter++;
      zero_counter = 0;
      break;
    case '8':
      message[endpoint] = eight[continuity_counter % 3];
      continuity_counter++;
      zero_counter = 0;
      break;
    case '9':
      message[endpoint] = nine[continuity_counter % 4];
      continuity_counter++;
      zero_counter = 0;
      break;
    }
    i++;
  }
  message[endpoint] = '\0';
  printf("%s\n", message);
  return ;
}

int main(void){
  int num, i;
  char input_str[1024];

  scanf("%d", &num);
  for(i = 0; i < num; i++){
    scanf("%s", input_str);
    message_analizer(input_str);
  }
  
  return 0;
}