#C3104. Capitalize Sentence

    ID: 46495 Type: Default 1000ms 256MiB

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.

## sample
this is a test
This Is A Test