The longest word

Report a typo

In the given string find the first longest word and output it.

Input data

Given a string in a single line. Words in the string are separated by a single space.

Output data

Output the longest word. If there are several such words, you should output the one, which occurs earlier.

Sample Input 1:

one two three four five six

Sample Output 1:

three
Write a program in Java 17
class Main {
public static void main(String[] args) {
// put your code here
}
}
___

Create a free account to access the full topic