~/algor $ cat problems/string-eng-uzun-soz
Longest word
Easy
1000 ms
128 MB
32%
A text $s$ of lowercase Latin letters and spaces is given. Find the longest word in the text. If several words have the same length, take the one that occurs first. Words are separated by a single space.
Input
One line containing the string $s$.
Output
The longest word on one line.
Note
$1 \le |s| \le 10^{5}$
$s$ consists of lowercase Latin letters and spaces
$s$ does not start or end with a space, and words are separated by exactly one space
Examples
Input #1
men dasturlashni yaxshi koraman
Output #1
dasturlashni
Input #2
ab cd ef
Output #2
ab