Write a program that, given a sequence of lines with words, tells which is the first line that has the words in increasing (lexicographic) order.
Input consists of a sequence of lines with words. Each line begins with a number , followed by words made up of only lowercase letters.
Print the index of the first line with the words in (not necessary strictly) increasing order. If there is no such line, tell so. Follow the format of the examples.
Author: Unknown
Translator: Carlos Molina
Generation: 2026-01-25T12:22:16.786Z
© Jutge.org, 2006–2026.
https://jutge.org