The Count

3.2

5 votes
Problem

Dany is working to build a program which can count the no of words present in a any string , and he know one simple rule is that no of words in a string is +1 more than the no of spaces in a string , so he try to count the total no of spaces in a string , so you have to help him to count the no of words present in any string.

Input

First line of input contains the number of test cases(T). Next each of T lines contains a small case string .

Output

You have to print the single digit answer for each test case.

Constraints :
1<T<=100
1<string<=100

Note : There would be any no of spaces in the input.

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?