In this problem, the first line of input contains a string C, we define C1 worth 1 coin, C2 worth 2 coins, C3 worth 3 coins ...., C26 worth 26 coins, other charactor worth 0 coin.
Now we have some lines of string S (may contain spaces), you need to write a program to calculate how much each line is worth until S = 0 or end.
The first line contains a string C, Ci worth i coins
The next lines, each line contains a string S (may contain spaces)
Testcases:
(4/7) C = abcdefghijklmnopqrstuvwxyz, 0 <= |S| <= 100, ∀S ≠ end
(1/7) C = abcdefghijklmnopqrstuvwxyz, 0 <= |S| <= 100
(1/7) C = the permutaion of a ~ z, 0 <= |S| <= 100, ∀S ≠ end
(1/7) C = the permutaion of a ~ z, 0 <= |S| <= 100
Output the value of each line of string until S = 0 or end.