#include<stdio.h>
#include<string.h>
char key[10][5]={{},{'.',',','!','?',' '},{'a','b','c'},{'d','e','f'},{'g','h','i'},
    {'j','k','l'},{'m','n','o'},{'p','q','r','s'},{'t','u','v'},{'w','x','y','z'}};
int num[10]={1,5,3,3,3,3,3,4,3,4};
int main(void){
    int n; scanf("%d",&n);
    getchar();
    for(int i=0;i<n;i++){
        char c[1030]; char output[80]={0};
        scanf("%s",c); int len=strlen(c);
        int prev=c[0]-'0';
        int cnt=0; int idx=0;
        for(int i=1;i<len;i++){
            int cur=c[i]-'0';
            if(prev==cur) cnt=(cnt+1)%num[cur];
            if(prev!=0&&cur==0) output[idx++]=key[prev][cnt],cnt=0;
            prev=cur;
        }
        printf("%s\n",output);
    }
}

