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 that occurs first.

Sample Input 1:

one two three four five six

Sample Output 1:

three
Write a program in Kotlin
fun main() {
// write your code here
}
___

Create a free account to access the full topic