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:
l=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
asc=[2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7,7,8,8,8,9,9,9,9]
t=input()
for x in range(0,t):
    st=raw_input()
    ans=''
    ind=0
    lst=list(st)
    for j in range(0,len(lst)):
        ind=l.index(lst[j])
        ans=ans+str(asc[ind])
    print ans