input: Write a function to generate a Markov chain given a text input. The function should split the input text into words, build a Markov chain from the word transitions, and then generate a new text using the generated Markov chain. The generated text should be 100 words long, or until no more words can be generated, whichever comes first. If the input text 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?')
  assert generateMarkov('') == ''
output: def generateMarkov(text):
      if not text:
          return ''
      
      words = text.split()
      chain = {}
      for i in range(len(words) - 1):
          if words[i] not in chain:
              chain[words[i]] = []
          chain[words[i]].append(words[i + 1])
      
      current_word = words[0]
      result = [current_word]
      for _ in range(100):
          if current_word in chain:
              next_word = random.choice(chain[current_word])
              result.append(next_word)
              current_word = next_word
          else:
              break
      
      return ' '.join(result)