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

char data[10][6] = {
    "*",
    ".,!? ",
    "abc",
    "def",
    "ghi",
    "jkl",
    "mno",
    "pqrs",
    "tuv",
    "wxyz"
};

int data_len[10] = {1,5,3,3,3,3,3,4,3,4};

char out[256][2048],answer[256][2048];

int main(void){
    int k,c;
    scanf("%d",&c);
    for(k=0;k<c;k++){
      int i,j=0,count=-1,length,num,flag=0;
      char input[2048],input_num[2];
      char now;
      scanf("%s",input);
      length = strlen(input);
      input_num[1]='\0';
      now = input[0];
      for(i=0;;i++){
        if(input[i]=='\0') break;
        if(now==input[i]) count++;
        else{
          input_num[0] = now;
          out[k][j] = data[atoi(input_num)][count%data_len[atoi(input_num)]];
          j++;
          count = -1;
          now = input[i];
          i--;
        }
      }
      j = 0;
      for(i=0;i<strlen(out[k]);i++){
        if(out[k][i]!='*'){
          answer[k][j] = out[k][i];
          j++;
      }
      }
    }
    for(k=0;k<c;k++){
        printf("%s\n",answer[k]);
    }
    return 0;
}
