input: from typing import List
  
  
  def frequent_words(words: List[str], n: int) -> List[str]:
      """Given a list of words and an integer n, return a list of words that appear at least n times in the given list.
      >>> frequent_words(['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd'], 3)
      ['a', 'd']
      >>> frequent_words(['apple', 'banana', 'apple', 'banana', 'cherry'], 2)
      ['apple', 'banana']
      """
output:     word_count = {}
      for word in words:
          if word in word_count:
              word_count[word] += 1
          else:
              word_count[word] = 1
      
      result = [word for word, count in word_count.items() if count >= n]
      return result