input: Write a function to generate a Markov chain from a given text input. The function should return a generated text based on the Markov chain. 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?')==True
  assert generateMarkov('The quick brown fox jumps over the lazy dog')==True
  assert generateMarkov('')==False
  assert generateMarkov('This is a test text')==True
  assert generateMarkov('Lorem ipsum dolor sit amet, consectetur adipiscing elit')==True
output: def generateMarkov(text):
      if not text:
          return ""
      import random
      words = text.split()
      markov_chain = {}
      for i in range(len(words) - 1):
          if words[i] not in markov_chain:
              markov_chain[words[i]] = []
          markov_chain[words[i]].append(words[i + 1])
      current_word = random.choice(list(markov_chain.keys()))
      result = [current_word]
      for _ in range(10):  # Generate 10 words for the output
          if current_word in markov_chain:
              next_word = random.choice(markov_chain[current_word])
              result.append(next_word)
              current_word = next_word
          else:
              break
      return ' '.join(result)