#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
    int t;
    cin >> t;
    vector<string> c(10);
    c[1] = ".,!? ";
    c[2] = "abc";
    c[3] = "def";
    c[4] = "ghi";
    c[5] = "jkl";
    c[6] = "mno";
    c[7] = "pqrs";
    c[8] = "tuv";
    c[9] = "wxyz";
    while(t--){
        string s;
        cin >> s;
        string ans = "";
        int t = 0;
        int n = s.size();
        for(int i = 0; i < n; i++){
            if(s[i] > '0'){
                t++;
            }else{
                if(t){
                    int m = c[s[i-1]-'0'].size();
                    ans += c[s[i-1]-'0'][(t+m-1)%m];
                    t = 0;
                }
            }
        }
        cout << ans << endl;
    }
}

