input: def generateMarkov(text: str) -> str:
      """ Generate a Markov chain from the given text input and produce a generated text output.
      The Markov chain is built by examining pairs of consecutive words in the input text.
      Each word in the chain is followed by a set of possible next words with their frequencies.
      Using this chain, a new text of about 100 words is generated, starting from a random word.
  
      >>> text = '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?'
      >>> generated_text = generateMarkov(text)
      >>> len(generated_text.split())
      100
      """
output:     import random
      import re
  
      def build_markov_chain(text):
          words = re.findall(r"[\w']+|[.,!?;]", text)
          chain = {}
          for i in range(len(words) - 1):
              word = words[i]
              next_word = words[i + 1]
              if word not in chain:
                  chain[word] = {}
              if next_word not in chain[word]:
                  chain[word][next_word] = 0
              chain[word][next_word] += 1
          return chain
  
      def choose_next_word(chain, word):
          if word not in chain:
              return None
          next_words = chain[word]
          words, weights = zip(*next_words.items())
          return random.choices(words, weights=weights)[0]
  
      def generate_text(chain, length=100):
          current_word = random.choice(list(chain.keys()))
          text = [current_word]
          while len(text) < length:
              next_word = choose_next_word(chain, current_word)
              if next_word is None:
                  break
              text.append(next_word)
              current_word = next_word
          return ' '.join(text)
  
      chain = build_markov_chain(text)
      return generate_text(chain)