input: 
  def build_dictionary(samples):
      dictionary = {}
      for sample in samples:
          key, value = sample.split("->")
          dictionary[key] = value
      return dictionary
  
  # Example:
  # >>> build_dictionary(["apple->red", "banana->yellow", "cherry->red"])
  # {'apple': 'red', 'banana': 'yellow', 'cherry': 'red'}
  
output:     for sample in samples:
          key, value = sample.split("->")
          dictionary[key] = value
      return dictionary