Even-Position Words Ascending X50754


Statement
 

pdf   zip

html

Write a program that reads a sequence of words and checks that all those in even positions form an ascending sequence.

Input

Each word in the input sequence consists only of lower case letters and has length at least 1. Words are separated by blank spaces or line ends, or both; at least one such separator, but maybe more than one. Their positions in the sequence are considered as starting with position zero.

Output

The words in odd positions can be arbitrary; if the words in even positions form an ascending sequence, according to the standard inequality comparison on strings, your program must write the message: "Even-Position Words Ascending." Otherwise, your program must write the message: "Even-Position Words Not Ascending."

Public test cases
  • Input

    about iii above pp across tt against mm before mmmm beside sss between
    

    Output

    Even-Position Words Ascending.
    
  • Input

    for jjjj from ddd in bb into mmmmm near rrr of eeee
    

    Output

    Even-Position Words Ascending.
    
  • Input

    from jjjj for ddd in bb into 
    

    Output

    Even-Position Words Not Ascending.
    
  • Input

    same same same same same
    

    Output

    Even-Position Words Not Ascending.
    
  • Information
    Author
    José Luis Balcázar
    Language
    English
    Official solutions
    Python
    User solutions
    Python