A word is composed of only letters of the alphabet (a-z, A-Z) and may contain one hyphen (-) or more. Given a text containing words, and other characters (punctuations, numbers, symbols, etc), you are to write a program to find the longest word.
Each letter or a hyphen in a word is counted as 1. For example,
The length of Apple is 5
The length of son-in-law is 10
The length of ACM-ICPC is 8
A text may contain several lines and paragraphs but the text does not exceed 10000 characters. No word can exceed 100 characters. The word E-N-D indicates the end of input.
Print out the longest word in small letters. If there exist several longest words, print only the first one found in the text.