input: def autocomplete(input_text: str) -> List[str]:
      """
      Given an input text, this function predicts words that can complete the text.
      The function generates word candidates, filters them and then ranks them to return the top 5.
      
      Example:
      >>> autocomplete("hel")
      ['hello', 'help', 'helium', 'hell', 'helmet']
      >>> autocomplete("thi")
      ['this', 'think', 'thing', 'thick', 'thigh']
      """
output:     word_candidates = ["hello", "help", "helium", "hell", "helmet", "this", "think", "thing", "thick", "thigh"]
      filtered_words = [word for word in word_candidates if word.startswith(input_text)]
      ranked_words = sorted(filtered_words, key=lambda x: (-len(x), x))
      return ranked_words[:5]