you participate in a prestigious literary competition. The jury appreciates not only the depth of thought, but also the wealth of the language. To impress, you decided to analyze your essay and find the longest and shortest word in it. This will help you understand how diverse your vocabulary is.
rn
task:
Write a program that accepts one line of text (your essay) and finds the longest and shortest word in it.
rn
restrictions:
rn
rn - word & nbsp; & mdash; This is any sequence of characters separated by spaces.
rn - punctuation: & nbsp; punctuation marks at the beginning or at the end of the word (.,! Symbols.
RN - register: & nbsp; comparison of words should be register-dependent. the same.
rn - resolution of the draw: rn
- If a few words have the same minimum length, the shortest one is considered to be the first to alphabetical. Style = "Font-Size: 14pt;"> empty input: if there is no words in the text (the line is empty or consists only of spaces and punctuation marks), the program should display the message ".".
rn & nbsp;
Input format
One line of text (string), which may contain words, gaps and punctuation marks.
Output format
The longest word from the text (String). On the next line & mdash; The shortest word from the text (string).
Example
Input
Hello, peace! This is a very, very long word and another word.
Hint
There will be no clue here, decide for yourself!