input: Write a function that takes a list of words and an integer n, and returns a list of words that appear at least n times in the given list.
  
  def frequent_words(words, n):
      from collections import Counter
      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(['apple', 'banana', 'apple', 'orange', 'banana', 'apple', 'grape'], 2)==['apple', 'banana']
  assert frequent_words(['x', 'y', 'z'], 2)==[]
  assert frequent_words([], 1)==[]
  assert frequent_words(['hello', 'hello', 'hello'], 3)==['hello']
output: def frequent_words(words, n):
      from collections import Counter
      counts = Counter(words)
      return [word for word, count in counts.items() if count >= n]