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:
i=input()
#print i
for _ in range(0,i):
    case=(raw_input())
    temp=''
    for x in range(0, len(case)):
        if case[x]>='j' and case[x]<='l':
            temp+='5'
        elif case[x]>='d' and case[x]<='f':
            temp+='3'
        elif case[x]>='t' and case[x]<='v':
            temp+='8'
        elif case[x]>='m' and case[x]<='o':
            temp+='6'
        elif case[x]>='a' and case[x]<='c':
            temp+='2'
        elif case[x]>='g' and case[x]<='i':
            temp+='4'
        elif case[x]>='p' and case[x]<='s':
            temp+='7'
        elif case[x]>='w' and case[x]<='z': 
            temp+='9'
    print temp