Encoding names
Submissions: 429   Accuracy:

58.5%

  Difficulty: Basic   Marks: 1

CBI agents are investigating a case in which they came across certain names of the culprits.They decided to encode the names into the number format.

"Riya" is encoded as "729611390","Sumitha" as "73108101981109993" ,"Anandita" as "55101891039410011294" and so on...Help them to encode the names.

Input:

First line of input contains an integer T denoting the number of test cases.T lines follow each of which containes a string S denoting the name of the culprits.
Output:

For each test case,print the encoded Integer in a new line.
Constraints:

1<=T<=100 and Names contains only english alphabets
Example:

Input

3

Soni

Mona

Pawan

Output

7310210298
6710210290
708811190104

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

Author: Riya Bhardwaj


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



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

to report an issue on this page.