#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
 string a[9] = {".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};
 int n;
 cin >> n;
 for(int k=0; k<n; k++){
   string s;
   cin >> s;
   for(int i=0; i<(int)s.size(); i++){
     char c = s[i];
     int count = 0;
     for(i=i+1; i<(int)s.size(); i++){
       if(s[i] != c) break;
       count++;
    }
    i--;
    if(c=='0') continue;
    int num = c-'0'-1;
    int tmp = count % a[num].size();
    cout << a[num][tmp];
    }
    cout << endl;
 }
 return 0;
}


