input: def autocomplete(input_text: str) -> List[str]:
      """
      Create an autocomplete system that predicts words based on the input text.
      The function generates word candidates, filters them, and then ranks them to return the top 5 words.
      >>> autocomplete("hel")
      ['hello', 'help', 'hell', 'helper', 'helmet']
      >>> autocomplete("app")
      ['apple', 'application', 'app', 'apply', 'appear']
      """
output:     word_list = ['hello', 'help', 'hell', 'helper', 'helmet', 'apple', 'application', 'app', 'apply', 'appear']
      filtered_words = [word for word in word_list if word.startswith(input_text)]
      sorted_words = sorted(filtered_words, key=lambda x: (-len(x), x))
      return sorted_words[:5]