#include <stdio.h>
#include <string.h>
 
int main( void ) {
    int n, sum, key;
    const char ch[ 9 ][ 6 ] = { ".,!? ", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz" };
 
    for ( scanf( "%d ", &n ); n--; putchar( '\n' ) )
        while ( ( key = getchar() ) != '\n' ) {
            if ( key == '0' )
                continue;
 
            for ( sum = 0; getchar() != '0'; sum++ ) ;
 
            putchar( ch[ key - '1' ][ sum % strlen( ch[ key - '1' ] ) ] );
        }
 
    return 0;
}