#B2121. Longest and Shortest Word Finder
Longest and Shortest Word Finder
Longest and Shortest Word Finder
Given an input sentence that consists of at most $200$ words (each word with at most $100$ letters) and contains only letters, spaces, commas, and periods. A word is defined as a contiguous sequence of letters. Spaces, commas, and periods act as delimiters between words.
Your task is to output the first longest word and the first shortest word found in the sentence.
inputFormat
The input consists of $1$ line that represents a sentence.
outputFormat
Output the first longest word and the first shortest word separated by a space.
sample
I love programming.
programming I