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:
for _ in range(input()):
	a=list(raw_input())
	arr=[]
	for item in a:
		if item =='a' or item =='b' or item =='c':
			arr.append('2')
		elif item =='d' or item =='e' or item =='f':
			arr.append('3')
		elif item =='g' or item =='h' or item =='i':
			arr.append('4')
		elif item =='j' or item =='k' or item =='l':
			arr.append('5')
		elif item =='m' or item =='n' or item =='o':
			arr.append('6')
		elif item =='p' or item =='q' or item =='r' or item =='s':
			arr.append('7')
		elif item =='t' or item =='u' or item =='v':
			arr.append('8')
		elif item =='w' or item =='x' or item =='y' or item =='z':
			arr.append('9')
		
		
	print ''.join(arr)