#C16. Longest Word Finder

    ID: 44822 Type: Default 1000ms 256MiB

Longest Word Finder

Longest Word Finder

You are given a sentence as input. Your task is to find and output the longest word in the sentence. If there are several words with the same maximum length, you should output the first one that appears. If the input string is empty, output an empty string.

For example, given the input:

The quick brown fox jumped over the lazy dog

the output should be:

jumped

The logic for comparing word lengths can be mathematically expressed as follows:

$\text{LongestWord} = \max_{w \in \text{words}} \{|w|\}$, where $|w|$ denotes the number of characters in the word w.

inputFormat

The input consists of a single line containing a sentence. The sentence may contain letters, spaces, and punctuation. The entire sentence is provided via standard input (stdin).

outputFormat

Output the longest word found in the sentence to standard output (stdout). If the sentence is empty, output an empty string.

## sample
The quick brown fox jumped over the lazy dog
jumped