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

int main(){
  int ks[]={5,3,3,3,3,3,3,4,3,4},sel,cm,is,i,on,n,ni;
  char key[][6]={".,!? ","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};
  char inp[1025],out[77];
  scanf("%d",&n);
  for(ni=0;ni<n;ni++){
    scanf("%s",inp);
    is=strlen(inp);
    sel=-1;
    for(sel=-1,i=on=0;i<is;i++){
      if(inp[i]=='0'){
	if(sel!=-1){
	  out[on++]=key[sel][cm];
	  sel=-1;
	}
      }else{
	if(sel==(inp[i]-'0'-1)){
	  cm=(cm+1)%ks[sel];
	}else{
	  sel=inp[i]-'0'-1;
	  cm=0;
	}
      }
    }
    out[on]='\0';
    if(on) printf("%s\n",out);
  }
  return 0;
}