INPUT : The first line of input contains number of testcases T.
It is followed by T number of lines and each line contains a string s containing only
uppercase english letters(‘A’ - ‘Z’).
OUTPUT : In a single line ,print the required output corresponding to the input s.
s | OUTPUT |
PAQ | 226 |
ZXA | 243 |
CAT | 216 |
PPQ | 241 |
CONSTRAINTS:
1<length(s)<=5