Write a program that prints the second largest word, in alphabetical order, of a given a sequence of words, ignoring repetitions.
For instance, if the words are “hola”,
“adeu”, “hola”, “hi” and
“bye”, then the asked word is “hi”, because it
is not relevant that “hola” appears more than once.
Input consists of several words, all made up of only lowercase letters. There will always be at least two different words.
Print the second largest word in alphabetical order, ignoring repetitions.
Author: Unknown
Translator: Salvador Roura
Generation: 2026-01-25T12:22:01.653Z
© Jutge.org, 2006–2026.
https://jutge.org