Problem description
Ravi has fallen in love with Riya. As he is my best friend, I am the only person who knows it and of course I am not going to tell you how this happened :DHe starts messaging Riya as everyone does and soon realizes that his fingers are unable to type any more. He decides to reduce his work from the next day. He got an idea about how to calculate the overhead required to type a particular message. His mobile contains only one button and he needs to press the button based on the rank of a letter (only lower case letters are used) i.e. if he wants to type the letter ‘c’ he needs to press the button 3 times. Ravi wants your help to decide the total overhead of typing a particular string.

Input
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows. The only line of each test case contains a string S.

Output
For each test case, output only line containing the total overhead.

Constraints

1 ≤ T ≤ 10000
1 ≤ |S| ≤ 1000


Example
Input:
2
acd
abcde

Output:
8
15
t=input()
s="abcdefghijklmnopqrstuvwxyz"
d={}
count=1
for i in s:
	d[i]=count
	count+=1
for kk in range(0,t):
	s=raw_input()
	ans=0
	for i in s:
		ans+=d[i]
	print ans