input: Write a python function to generate text using a Markov Chain from an input text file.
  assert len(generate_text('input.txt')) > 0
output: import random
  
  def generate_text(file_path, chain_length=2, output_length=100):
      def build_chain(text, chain_length):
          chain = {}
          words = text.split()
          for i in range(len(words) - chain_length):
              key = tuple(words[i:i + chain_length])
              next_word = words[i + chain_length]
              if key not in chain:
                  chain[key] = []
              chain[key].append(next_word)
          return chain
  
      with open(file_path, 'r') as file:
          text = file.read()
  
      chain = build_chain(text, chain_length)
      seed = random.choice(list(chain.keys()))
      result = list(seed)
      
      for _ in range(output_length - chain_length):
          key = tuple(result[-chain_length:])
          next_word = random.choice(chain.get(key, seed))
          result.append(next_word)
  
      return ' '.join(result)