Problem1043--Counting Words

1043: Counting Words

[Creator : ]
Time Limit : 1 sec  Memory Limit : 128 MB

Description

DongDong prefers English words to English sentences, so he wants to count the words of a sentence. Could you help him?

Input

The first line contains a positive integer T (T<=1000), which means T test cases. Then comes T lines, each line contains a string which combines with several words separated by spaces. Note that there may be more than one space to separate two words.

Output

For each test case, please print the number of words of the sentence.

Sample Input Copy

3
 Every night in my dreams
   I see you  I feel you   
That  is  how I know you go on

Sample Output Copy

5
6
8