#Z15315. 最长最短单词
最长最短单词
Description
Input one line of a sentence (no more than 200 words, each word no longer than 100 characters), containing only letters, spaces, and commas. Words consist of at least one consecutive letter, with spaces and commas acting as separators between words.
Output the first longest word and the first shortest word.
Input Format
One line of a sentence.
Output Format
The first line: the first longest word.
The second line: the first shortest word.
I am studying Programming language C in Peking University
Programming
I
Hint
Hint:
If all words are of the same length, then the first word is both the longest and the shortest word.