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

int main(void) {
    int T; scanf("%d", &T);
    char* btn[] = { ".,!? ", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz" };
    while(T--) {
        int pt = 0;
        int len;
        char s[1025];

        scanf(" %s", s);
        len = strlen(s);

        while(pt < len) {
            int k;
            char c = s[pt++];
            if (c == '0') continue;
            int cnt = 0;
            while(s[pt] != '0') pt++, cnt++;
            pt++;

            k = c - '0' - 1;
            cnt %= strlen(btn[k]);
            putchar(btn[k][cnt]);
        }

        putchar('\n');
    }
    return 0;
}