Uppercase and lowercase words P65152


Statement
 

pdf   zip

thehtml

Write a program that, given a sequence of words, each one with at most six characters, all letters, prints the first word that starts with an uppercase letter and the first word that starts with a lowercase letter.

Input

Input consists of a sequence of words, each one with at mots six characters, all letters.

Output

Your program must print two lines, the first one with the first word that starts with an uppercase letter, and the second one with the first word that starts with a lowercase letter. If do not exist any or none of them, indicate it as it is shown in the examples.

Observations

  • To solve this problem, maybe can be useful to you knowing that the uppercase letters have a lower code that the lowercase letters.

  • If this problem was after the partial examination, you would have right to access to the strings as if they were vectors, and the solution would be trivial.

Public test cases
  • Input

    THING TaKe wHo wHAT how ARE you
    

    Output

    THING
    wHo
    
  • Input

    How Many Cars Can A Carpark Park
    

    Output

    How
    There is not any word that starts with a lowercase letter.
    
  • Input

    hello
    

    Output

    There is not any word that starts with an uppercase letter.
    hello
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++
    User solutions
    C++ Python