#C14646. Unique Words Extraction
Unique Words Extraction
Unique Words Extraction
Given a sentence, extract all unique words by splitting the sentence based on whitespace. Convert all words to lowercase and then sort them in alphabetical order. Note that punctuation is considered part of the word.
If the input sentence is empty, output an empty line.
Example: For the input "Hello world! Hello Python.", the unique words are "hello", "python.", and "world!"; when sorted alphabetically, the output should be: hello python. world!
.
inputFormat
The input consists of a single line containing the sentence.
outputFormat
Output a single line with the unique words (converted to lowercase) sorted in alphabetical order and separated by a space. If there are no words, output an empty line.
## sampleHello world! Hello Python.
hello python. world!