405888: GYM102152 F camelCase;

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

F. camelCase;time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

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.

Input

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.

Output

For each test case, print a single line containing "YES" (without quotes) if the given variable name is accepted. Otherwise, print "NO" (without quotes).

ExampleInput
2
weFoundYou
isTheCamelCaseTheBestWayToNameAVariable
Output
YES
NO
Note

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.

加入题单

算法标签: