URI Online Judge | 2694

Problem with the Calculator

By Neilor Tonin, URI BR Brazil

Timelimit: 1

JoĆ£ozinho have to help his father. One specific report are being pressed with unwished letters between the three existing numbers. You have to do a program to sum these three numbers, ignoring the letters existents. Each line have no spaces.

Input

The first line of input contains an integer N (N < 100000). Follow N lines with exacly 14 characters that must be read and the three number existing in this line must be extracted and summed.

Output

For each input, your program must print a integer representing the sum of the 3 existent numbers of that line.

Input Sample Output Sample

3
Ab23s249ttu21
At01v021kkk12
xx14l134mjm01

293
34
149