input: Write a function to return a list of words that appear at least n times in the given list of words. If a word appears more than n times, it should be included in the result. If no words meet the criteria, an empty list should be returned. If the list of words is empty, the result should be 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'], 2) == ['a']
  assert frequent_words(['a', 'b', 'c', 'd'], 1) == ['a', 'b', 'c', 'd']
  assert frequent_words(['a', 'b', 'a'], 3) == []
  assert frequent_words([], 1) == []
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]