You are given N strings of alphabet characters and the task is to find their matching decimal representation as on the shown keypad. Output the decimal representation corresponding to the string. For ex: if you are given “amazon” then its corresponding decimal representation will be 262966.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of a single line containing a string.
For each test case, print in a new line, the corresponding decimal representation of the given string.
1 ≤ T ≤ 100
1 ≤ length of String ≤ 100