We define the usage of capitals in a word to be right when one of the following cases holds:
- All letters are capitals (e.g. "USA")
- All letters are not capitals (e.g. "leetcode")
- Only the first letter is capital (e.g. "Google")
Given a string word, return true if the usage is right, false otherwise.
Example 1:
Input: USA Output: true
Example 2:
Input: FlaG Output: false
Input format: A single word.
Output format: true or false.