input: 
  from typing import List
  
  def generateMarkov(text: str) -> str:
      """ Generate a Markov chain from the given text input and create a new text
      based on the probabilities of word transitions.
      >>> 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?')
      '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 conversation?'
      """
  
output:     
      import random
      from collections import defaultdict
  
      words = text.split()
      transitions = defaultdict(list)
  
      for i in range(len(words) - 1):
          transitions[words[i]].append(words[i + 1])
  
      current_word = random.choice(words)
      result = [current_word]
  
      for _ in range(len(words) - 1):
          if current_word in transitions:
              next_word = random.choice(transitions[current_word])
              result.append(next_word)
              current_word = next_word
          else:
              break
  
      return ' '.join(result)
  