input: from typing import List
  
  def generateMarkov(text: str) -> str:
      """
      Generate a Markov chain based on the given text input.
      The function splits the text into words, creates a Markov chain dictionary
      by counting the occurrences of each word following another word,
      and then generates 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, `and what is the use of a book,' thought Alice `without pictures or conversation?''
      """
output:     
      words = text.split()
      markov_dict = {}
  
      for i in range(len(words) - 1):
          current_word = words[i]
          next_word = words[i + 1]
          
          if current_word in markov_dict:
              markov_dict[current_word].append(next_word)
          else:
              markov_dict[current_word] = [next_word]
  
      start_word = words[0]
      result = [start_word]
      current_word = start_word
  
      while current_word in markov_dict:
          next_words = markov_dict[current_word]
          next_word = random.choice(next_words)
          result.append(next_word)
          current_word = next_word
  
      return ' '.join(result)
  