input: from typing import List
  
  
  def build_dictionary(samples: List[str]) -> dict:
      """
      Build a dictionary from string to string of the given samples.
      
      >>> samples = ["apple->red", "banana->yellow", "cherry->red"]
      >>> build_dictionary(samples)
      {'apple': 'red', 'banana': 'yellow', 'cherry': 'red'}
      """
      dictionary = {}
      for sample in samples:
          key, value = sample.split("->")
          dictionary[key] = value
      return dictionary
output:     dictionary = {}
      for sample in samples:
          key, value = sample.split("->")
          dictionary[key] = value
      return dictionary