the-count

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.

SAMPLE INPUT
3
i am awesome
so   here    i am     again
adios      amigos

SAMPLE OUTPUT
3
5
2

Source: hackerearth | Difficulty: UNKNOWN_DIFFICULTY


Solutions: