#C1644. Important Sentence Evaluation
Important Sentence Evaluation
Important Sentence Evaluation
You are given a series of sentences. A sentence is considered important if and only if:
- It ends with one of the following punctuation marks:
.
,!
, or?
; - It contains at least one capitalized word – that is, a word which starts with an uppercase letter followed by only lowercase letters (other characters such as punctuation are allowed at the end).
Your task is to determine for each sentence whether it is "Important" or "Not Important" based on the conditions above.
For multiple sentences, evaluate each sentence separately and output the corresponding result on a new line.
inputFormat
The first line contains an integer N (1 ≤ N ≤ 10^5), indicating the number of sentences. Each of the following N lines contains one sentence.
outputFormat
For each sentence, print a single line with either "Important" if the sentence meets the conditions, or "Not Important" otherwise.## sample
3
This is a test.
another test
What a day!
Important
Not Important
Important
</p>