#C6709. Capitalize Words

    ID: 50499 Type: Default 1000ms 256MiB

Capitalize Words

Capitalize Words

Given an input string, write a program to capitalize the first letter of each word. A word is defined as a maximal sequence of non-whitespace characters. The input string may contain multiple spaces, tabs, or newline characters. If the input string is empty, your program should output an empty string.

This problem must be solved by reading from standard input and printing the result to standard output. Implementations in Python, C++, Java, C, and JavaScript are required.

inputFormat

The input is read from standard input (stdin) as a single line that contains the string. This string can include letters, punctuation, spaces, and tab characters.

outputFormat

Print the transformed string to standard output (stdout) such that the first letter of each word is capitalized. Words are delimited by any whitespace, and the output should join the words with a single space.

## sample
the quick brown fox
The Quick Brown Fox