405888: GYM102152 F camelCase;
Description
Camel case is a naming convention practice for multi-word identifiers in programming languages. In this practice, each word except for the first word will begin with an uppercase letter, with no intervening spaces or punctuation.
For example, "problem", "contestName", and "contestStartingTime" are all following the camel case practice, while "Server", "ProblemName", and "first-Place" are not.
in this problem, you are given a variable name that is following the camel case naming practice, and your task is to determine if the variable name is accepted or not. A variable name is accepted if it is consisting of no more than $$$7$$$ words.
The first line contains an integer $$$T$$$ ($$$1 \le T \le 100$$$) specifying the number of test cases.
Each test case consists of a single line containing a string $$$s$$$ of length no more than $$$100$$$, giving a variable name. It is guaranteed that the variable name is following the camel case practice as described in the statement, and it contains only lowercase and uppercase English letters.
OutputFor each test case, print a single line containing "YES" (without quotes) if the given variable name is accepted. Otherwise, print "NO" (without quotes).
ExampleInput2 weFoundYou isTheCamelCaseTheBestWayToNameAVariableOutput
YES NONote
In the first test case, the variable name consists of $$$3$$$ words, which are: "we", "Found", and "You". So, this variable name is accepted.
In the second test case, the variable name consists of $$$11$$$ words, which are: "is", "The", "Camel", "Case", "The", "Best", "Way", "To", "Name", "A", "Variable". So, this variable name is not accepted.