#include <stdio.h>

int main( void ) {
	int i, n, sum, elmNum[ 10 ] = { 0, 5, 3, 3, 3, 3, 3, 4, 3, 4 };
	char ch[ 10 ][ 61 ] = { "", ".,!?", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz" }, key, tmp;

	scanf( "%d%*c", &n );

	for ( i = 0; i < n; i++ ) {
		while ( 1 ) {
			scanf( "%c", &key );

			if ( key == '\n' )
				break;
			else if ( key == '0' )
				continue;

			for ( sum = 0; scanf( "%c", &tmp ), tmp != '0'; sum++ ) ;
			putchar( ch[ key - '0' ][ sum % elmNum[ key - '0' ] ] );
		}

		putchar( '\n' );
	}

	return 0;
}