Shubham wrote a sequence of words. The words are written using the rules given below:
You need to find the number of words in the string.
The first line of input contains T denoting the number of testcases. T testcases follow. Each testcase contains a single line of input that contains the string s.
For each testcase, in a new line, print the number of words in s.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.