#include <stdio.h>
int main()
{

  char s[2600],t,a[]={".,!? abcdefghijklmnopqrstuvwxyz"};
  int i,y,x,z[]={0,0,5,8,11,14,17,20,24,27,31};
  scanf("%d",&y);
  for(;y--;puts(""))
    {
      scanf("%s",s);
      for(i=0,t='\0',x=-1;s[i]!='\0';i++)
	{
	  if(s[i]!='0')
	    {
	      /*	      if(i!=0)
		{
		  if(s[i]!=s[i-1])
		    {
		      x=-1;
		      }
		      }*/
	      if(x==-1)
		{
		  x=z[s[i]-'0'];
		}
	      else
		{
		  x++;
		  if(x>=z[s[i]-'0'+1])
		    x=z[s[i]-'0'];
		}
	    }
	 if(s[i]=='0')
	    {
	      x=-1;
	      putchar(t);
	      t='\0';
	    }
	  if(x!=-1)
	    {
	      t=a[x];
	    }
	}
    }
  return 0;
}