#t271. 单词排序
单词排序
Word Sorting
Problem Background
Special for beginners, ^_^
Problem Description
Input a sequence of words on one line, where adjacent words are separated by one or more spaces. Output these words in lexicographic (dictionary) order, printing each distinct word only once. (Case-sensitive.)
Input Format
One line of words: at least and at most words, each word no longer than characters, separated by at least one space. The data contains no characters other than letters and spaces.
Output Format
Output the words in lexicographic order, printing each distinct word only once.
Sample Input
She wants to go to Peking University to study Chinese
Sample Output
Chinese
Peking
She
University
go
study
to
wants
Constraints
Time limit: 1s, memory limit: 1024KiB for each test case.
Hint
Comparison is case-sensitive: She and she are considered different words.