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:
from sys import stdin
for i in xrange(int(stdin.readline())):
    st=''
    for j in stdin.readline():
        if j in 'abc':
            st+='2'
        elif j in 'def':
            st+='3'
        elif j in 'ghi':
            st+='4'
        elif j in 'jkl':
            st+='5'
        elif j in 'mno':
            st+='6'
        elif j in 'pqrs':
            st+='7'
        elif j in 'tuv':
            st+='8'
        elif j in 'wxyz':
            st+='9'
    print st