BETA

Difficulty Level: Basic

Submissions: 3652 Accuracy:

50.66%

Keypad typing
     

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.

Input:

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.

Output:

For each test case, print in a new line, the corresponding decimal representation of the given string.

Constraints:

1 ≤ T ≤ 100
1 ≤ length of String ≤ 100

Example:

Input
2
geeksforgeeks
geeksquiz

Output
4335736743357
433577849

** For More Input/Output Examples Use 'Expected Output' option **

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.