PRF192-Examination 01
Problem 3
[3 Points]
Enter a string S which contains alphabets and spaces only, find and print the word with the fewest characters in the string. If there are multiple words with the same minimum length, print the first one that appears.
Input
The first line contains a string S.
Constraint
maximum length 200 characters.
Output
Please print out the word with the fewest characters in the string.
If there are multiple words with the same minimum length, print the first one that appears.
Sample
Input
Output
One
Zoom
Sample 1
This is a sample string
Sample 2
One two three six ten
+ 100%
Close