Autocomplete X78285


Statement
 

pdf   zip

html

Input

* Text in one line. > Hint: be careful with capital letters (’Printer’ must be treated the same as ’printer’).

> Also, we can expect to only have alphabetical characters.

* The word we want to autocomplete.

> To make things a little bit easier, the word we want to autocomplete will only contain lowercase letters.

Output Suggestion for the input word, in lowercase.

Public test cases
  • Input

    How many cookies could a good cook cook If a good cook could cook cookies
    coo
    

    Output

    cook
    
  • Input

    this is just a normal text
    hou

    Output

    hou
    
  • Input

    animal animal animal animate animate animate
    anima

    Output

    animal
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    Python
    User solutions
    C++ Python