Given an alphanumeric string made up of digits and lower case Latin characters only, find the sum of all the digit characters in the string.

-----Input-----
- The first line of the input contains an integer T denoting the number of test cases. Then T test cases follow.
- Each test case is described with a single line containing a string S, the alphanumeric string.

-----Output-----
- For each test case, output a single line containing the sum of all the digit characters in that string.

-----Constraints-----
- 1 ≤ T ≤ 1000
- 1 ≤ |S| ≤ 1000, where |S| is the length of the string S.

-----Example-----
Input:
1
ab1231da

Output:
7

-----Explanation-----
The digits in this string are 1, 2, 3 and 1. Hence, the sum of all of them is 7.

Starter code:

Solutions:
for _ in range(eval(input())):
 s = input()
 ans = 0
 for i in s:
  if i.isdigit():
   ans += int(i)
 print(ans) 

t = int(input())
while t:
 string = list(input())
 ans = 0
 for char in string:
  if ord(char) >= 48 and ord(char) <= 57:
   ans += ord(char) - 48 
 print(ans)
 t -= 1 

n = int(input())
c = 0
for i in range(n):
 a = input()
 for i in a:
  if i.isdigit() :
   c += int(i)
 print(c)
 c = 0


# your code goes here
t = int(input())
for _t in range(t):
 st = input()
 ans = 0
 for i in st:
  if i>'0' and i <= '9':
   ans += int(i)
 print(ans)

# cook your code here
t=int(input())
for i in range(t):
 l=list(input())
 count=0
 for j in l:
  if(j.isdigit()):
   count=count+int(j)
 print(count)

# nonlocal vairables
T = eval(input())
counter = 1

# methods
def ri():
 return list(map(int,input().strip().split()))

def rs():
 return input().strip().split()

def solve():
 S = rs()[0]
 ans = 0
 for i in S:
  # print i
  if i.isdigit():
   ans += int(i)
 return ans

while T>0:
 T-=1
 print(str(solve()))
 counter+=1


t = int(input())
while t>0:
 t-=1
 sum = 0
 a = input()
 b = list(a)
 for i in b:
  if (i.isdigit()):
   
   sum+=int(i);

 print(sum)

t=eval(input())
for x in range(0,t):
 arr=list(input())
 sum=0
 for i in arr:
  if(i.isdigit()):
   sum+=int(i)
 print(sum)

def getSum(s1):
 sum = 0
 for c in s1:
  if c.isdigit():
   sum += int(c)
 return sum

T = int(input())
for i in range(T):
 s = input()
 print(getSum(s))

import string
t= int (input().strip())
for i in range(t):
 s=input().strip()
 c=0
 for j in s:
  if j.isdigit():
   c+=int(j)
 print(c)


T = eval(input())

while (T > 0):
 S = input()
 res = 0
 for i in range(len(S)):
  if (ord(S[i]) <= 57 and ord(S[i]) >=49 ):
   res = res + int(S[i])
 print(res)
 T = T - 1

t=eval(input())
for ii in range(t):
 s=input()
 ans=0
 for i in s:
  if i.isdigit():ans+=int(i)
 print(ans)

T = int(input())
for t in range(T):
 word = input()
 s = 0
 for c in word:
  if c.isdigit():
   s += int(c)
 print(s)


def int_(s):
 try: 
  int(s)
  return True
 except ValueError:
  return False
t=int(input())
while t>0:
 c = str(input())
 s=0
 for i in c:
  if int_(i):
   s=s+int(i)
 print(s) 
 t=t-1

T = int(input())

for i in range(T):
 s = input()
 count = 0
 for j in range(len(s)):
  if(s[j].isdigit()):
   count += int(s[j])
 print(count)

T = int(input())
for _ in range(T):
 s = input()
 tot = 0
 for x in s:
  if 0<ord(x)-48<10:
   tot += ord(x) - 48
 print(tot)

c=1
cases=eval(input())

while(c<=cases):
 s=list(input())
 sumc=0
 for i in s:
  g=ord(i)
  if(g>48 and g<=57):
   sumc+=int(i)
 print(sumc)
 c=c+1

t=int(input().strip())
for _ in range(t):
 p = input().strip()
 count=0
 for i in p:
  if not('a'<=i<='z'):
   count+=int(i)
 print(count)


n = int(input())

c=0
sum=0
while n:
 n-=1
 a = [i for i in input()]
 sum=0
 for i in a:
  try:
   sum+=int(i)
  except:
   continue
 print(sum)