sum-of-digits-updated
Source: hackerearth
Difficulty: UNKNOWN_DIFFICULTY

Given number N, print sum of  all of its digits.

Input

First Line of input contains integer T denoting number of test cases.
Next T lines contains number N

Output

For each test case, print sum of digits of number N.

Constraints

1 ≤ T ≤ 10

Number of digits in N in range [1, 10000000]

SAMPLE INPUT
2
123
56666

SAMPLE OUTPUT
6
29