input: Write a function to take a list of words and an integer n, and return a list of words that appear at least n times in the given list.
  
  def frequent_words(words, n):
      counts = Counter(words)
      return [word for word, count in counts.items() if count >= n]
  
  words = ['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd']
  n = 3
  assert frequent_words(words, n) == ['a', 'd']
  
  words = ['x', 'y', 'x']
  n = 2
  assert frequent_words(words, n) == ['x']
  
  words = ['a']
  n = 2
  assert frequent_words(words, n) == []
  
  words = []
  n = 1
  assert frequent_words(words, n) == []
output: def frequent_words(words, n):
      counts = Counter(words)
      return [word for word, count in counts.items() if count >= n]