input: Write a function to generate a Markov chain from a given text input. The Markov chain should be built by analyzing the frequency of word transitions in the input text. The function should then generate a sequence of 100 words based on the Markov chain. If the text input is empty, the function should return an empty string.
  assert generateMarkov("Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, `and what is the use of a book,' thought Alice `without pictures or conversation?'")==generated text based on the Markov chain
  assert generateMarkov("")==""
output: def generateMarkov(text):
      if not text:
          return ""
      
      words = text.split()
      word_dict = {}
      
      for i in range(len(words) - 1):
          if words[i] in word_dict:
              word_dict[words[i]].append(words[i + 1])
          else:
              word_dict[words[i]] = [words[i + 1]]
      
      current_word = words[0]
      result = [current_word]
      
      for _ in range(100):
          if current_word not in word_dict:
              break
          next_word = random.choice(word_dict[current_word])
          result.append(next_word)
          current_word = next_word
      
      return " ".join(result)