Encoding names
Basic Accuracy: 56.63% Submissions: 708 Points: 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

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.