input: Write a function to find all words in a given list that appear at least n times. The function should take a list of words and an integer n as input and return a list of words that meet the criteria. If the given list is empty, return an empty list.
  assert frequent_words(['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd'], 3) == ['a', 'd']
  assert frequent_words(['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd'], 2) == ['a', 'd']
  assert frequent_words(['a', 'b', 'c', 'd'], 1) == ['a', 'b', 'c', 'd']
  assert frequent_words([], 3) == []
output: def frequent_words(words, n):
      from collections import Counter
      word_counts = Counter(words)
      return [word for word, count in word_counts.items() if count >= n]