input: Write a python function to sort words by their frequency in a given text.
  assert frequencySort("this is a test this is only a test") == ["this", "is", "a", "test", "only"]
  assert frequencySort("apple banana apple orange banana apple") == ["apple", "banana", "orange"]
  assert frequencySort("one two three two three three") == ["three", "two", "one"]
output: def frequencySort(text):
      from collections import Counter
      words = text.split()
      freq = Counter(words)
      sorted_words = sorted(freq.keys(), key=lambda x: (-freq[x], x))
      return sorted_words