#include <stdio.h>

char buf[1025];
char c1[]=".,!? ";
char c2[]="abc";
char c3[]="def";
char c4[]="ghi";
char c5[]="jkl";
char c6[]="mno";
char c7[]="pqrs";
char c8[]="tuv";
char c9[]="wxyz";

int main(void){
    int count,lines,i,j;
    scanf("%d",&lines);
    for(i=0;i<lines;i++){
        scanf("%s",buf);
        j=0;
        count=0;
        while(buf[j]){
            if(buf[j]=='0'){
                switch(buf[j-1]){
                    case '0':
                        break;
                    case '1':
                        printf("%c",c1[(count-1)%5]);
                        break;
                    case '2':
                        printf("%c",c2[(count-1)%3]);
                        break;
                    case '3':
                        printf("%c",c3[(count-1)%3]);
                        break;
                    case '4':
                        printf("%c",c4[(count-1)%3]);
                        break;
                    case '5':
                        printf("%c",c5[(count-1)%3]);
                        break;
                    case '6':
                        printf("%c",c6[(count-1)%3]);
                        break;
                    case '7':
                        printf("%c",c7[(count-1)%4]);
                        break;
                    case '8':
                        printf("%c",c8[(count-1)%3]);
                        break;
                    case '9':
                        printf("%c",c9[(count-1)%4]);
                        break;
                }
                count=0;
            }else{
                count++;
            }
            j++;
        }
        printf("\n");
    }
    return 0;
}