Problem: Solve The Mystery

Input:
First line contains T - number of test cases.
Following T lines each contains a string of characters in the range [a-z] only  

Output:
Print a numeric string for each test case.  

Constraints:
1 ≤ T ≤ 100
1 ≤ Length of String ≤ 100  

SAMPLE INPUT
10
key
to
control
nine
tails
is
in
your
hand
phone

SAMPLE OUTPUT
539
86
2668765
6463
82457
47
46
9687
4263
74663

Solution (in PYTHON):

Solution:
'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
def print_number(input_string):
	output = ''
	t9_dict = {}
	t9_dict['a'] = t9_dict['b'] = t9_dict['c'] = 2
	t9_dict['d'] = t9_dict['e'] = t9_dict['f'] = 3
	t9_dict['g'] = t9_dict['h'] = t9_dict['i'] = 4
	t9_dict['j'] = t9_dict['k'] = t9_dict['l'] = 5
	t9_dict['m'] = t9_dict['n'] = t9_dict['o'] = 6
	t9_dict['p'] = t9_dict['q'] = t9_dict['r'] = t9_dict['s'] = 7
	t9_dict['t'] = t9_dict['u'] = t9_dict['v'] = 8
	t9_dict['w'] = t9_dict['x'] = t9_dict['y'] = t9_dict['z'] = 9

	for char in input_string:
		output = output + str(t9_dict[char])
	print output



if __name__ == '__main__':
	cases = int(raw_input().strip())
	start = 1
	while start <= cases:
		input_string = raw_input().strip()
		print_number(input_string)
		start = start + 1