input: from typing import List
  
  def generateMarkov(text: str) -> str:
      """Given a text input, generate a Markov chain and then create a new text based on this chain.
      >>> 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?'")
      '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,'
      """
      
output:     
      import random
      from collections import defaultdict
  
      words = text.split()
      markov_chain = defaultdict(list)
  
      for i in range(len(words) - 1):
          markov_chain[words[i]].append(words[i + 1])
  
      start_word = random.choice(words)
      while start_word.islower():
          start_word = random.choice(words)
  
      result = [start_word]
      current_word = start_word
  
      while current_word in markov_chain:
          next_words = markov_chain[current_word]
          if not next_words:
              break
          next_word = random.choice(next_words)
          result.append(next_word)
          current_word = next_word
  
      return ' '.join(result)
  