Find the longest and shortest words in the following input.
Input: Wonderful, Tragic, Unruly
The longest word is "wonderful" and the shortest word is "tragic".
The longest word is "Tragic", and the shortest word is "unruly".