input: Write a function to return a list of words that appear at least n times in the given list of words. If the given list is empty then return an empty list.
  from collections import Counter
  
  def frequent_words(words, n):
      if not words:
          return []
      counts = Counter(words)
      return [word for word, count in counts.items() if count >= n]
  
  assert frequent_words(['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd'], 3) == ['a', 'd']
  assert frequent_words(['hello', 'world', 'hello'], 2) == ['hello']
  assert frequent_words(['a', 'a', 'b', 'b', 'c'], 2) == ['a', 'b']
  assert frequent_words([], 1) == []
  assert frequent_words(['unique'], 1) == ['unique']
output: from collections import Counter
  
  def frequent_words(words, n):
      if not words:
          return []
      counts = Counter(words)
      return [word for word, count in counts.items() if count >= n]