input: Write a function to determine if it is possible to obtain a list of words that appear at least n times from a given list of words by implementing a Python program that takes two inputs: a list of words and an integer n. If it is possible, return True; otherwise, return False. If the list of words is empty, return True.
  assert frequent_words(['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd'], 3)==True
  assert frequent_words(['a', 'b', 'a', 'c', 'd', 'a', 'x', 'd', 'd'], 4)==False
  assert frequent_words(['a', 'b', 'c', 'd'], 2)==False
  assert frequent_words(['a', 'a', 'a', 'a'], 4)==True
  assert frequent_words([], 3)==True
output: def frequent_words(words, n):
      if not words:
          return True
      word_count = {}
      for word in words:
          if word in word_count:
              word_count[word] += 1
          else:
              word_count[word] = 1
      for count in word_count.values():
          if count >= n:
              return True
      return False