Text and lines X54145


Statement
 

pdf   zip

thehtml

Given a text of words, we are interested in lines having a-strings (strings starting with lowercase letter ’a’). Write a program that provided a text with one or more lines prints the first line in the text having more a-strings than the first text line has. If this line does not exist the program has to print the sentence Not found.

Input

Input consists of one or more lines of text.

Output

The first input line having more a-strings than the first line has. If this line does not exists the program has to print the sentence Not found.

Public test cases
  • Input

    When in Rome, do as the Romans
    A picture is worth a thousand words
    There's no such thing as a free lunch
    a penny saved is a penny earned
    

    Output

    There's no such thing as a free lunch
    
    
  • Input

    alfa beta
    beta Alfa alfa
    omega 
    

    Output

    Not found
    
  • Input

    bob
    alice       bob
    alice alice
    

    Output

    alice       bob
    
    
  • Information
    Author
    Language
    English
    Official solutions
    Python
    User solutions