#C3104. Capitalize Sentence
Capitalize Sentence
Capitalize Sentence
Given a sentence, transform it such that the first letter of each word is capitalized and the remaining letters are converted to lowercase. However, if a word contains any numerical digits, leave it unchanged. Punctuation marks attached to words should remain unaffected by the transformation.
For example:
Input: "this is 123a test" Output: "This Is 123a Test"
Note: Extra spaces should be removed from the beginning and end of the sentence, and consecutive spaces between words should be reduced to a single space.
inputFormat
The input consists of a single line containing the sentence.
outputFormat
Output the transformed sentence according to the rules described above.
## samplethis is a test
This Is A Test