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

int main(void){
    char key[9][6]={".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};
    char input[1025];
    int mcount[9]={5,3,3,3,3,3,4,3,4};
    int n,count,write;
    int i,j;
    scanf("%d",&n);
    char output[1025];
    for(i=0;i<n;i++){
        count=0;
        write=0;
        strcpy(input,"");
        strcpy(output,"");
        scanf("%s",input);
        for(j=1;j<=strlen(input);j++){
            if(input[j]!='0')count++;
            if(input[j]=='0' && input[j-1]!='0'){
                output[write]=key[input[j-1]-'1'][(count%mcount[input[j-1]-'1'])];
                write++;
                count=-1;
            }
            if(input[j]=='0' && input[j-1]=='0'){
                count=-1;
            }
            if(input[j]=='\0' && input[j-1]!='0'){
                output[write]=key[input[j-1]-'1'][(count-1)%(mcount[input[j-1]-'1'])];
                count=-1;
            }
        }
        output[write+1]='\0';
        printf("%s\n",output);
    }
    return 0;
}