题目描述
Now that we have recovered all our data, we can return to hacking in to the hacker's system. Our sources tell us that this hacker's lust for power is so great that it is reflected in everything he does, everything he creates. Perhaps this knowledge can become his weakness in our hands, his thirst for power laying a trap for him. News also arrives of a great weapon being developed by him, soon to be unleashed upon us. Can you break through the next level of his security and disable the cyber weapon while there is still time?
Input:
The first line will consist of the total number of test cases T.
The next T lines will consist of one string on each line.
Output:
For each test case, output is a number.
Example:
Input:
3
aranya
reverse
gear
Output:
124
252
159
输入格式
见题面
输出格式
见题面