input: Write a function to build a dictionary from string to string of the given samples. For each sample, the key and value are separated by "->". Return the dictionary.
  
  def build_dictionary(samples):
   dictionary = {}
   for sample in samples:
    key, value = sample.split("->")
    dictionary[key] = value
   return dictionary
  
  assert build_dictionary(["apple->red", "banana->yellow", "cherry->red"]) == {'apple': 'red', 'banana': 'yellow', 'cherry': 'red'}
  assert build_dictionary(["grape->purple", "orange->orange"]) == {'grape': 'purple', 'orange': 'orange'}
  assert build_dictionary([]) == {}
  assert build_dictionary(["dog->bark", "cat->meow"]) == {'dog': 'bark', 'cat': 'meow'}
  assert build_dictionary(["sun->yellow", "moon->white"]) == {'sun': 'yellow', 'moon': 'white'}
output: def build_dictionary(samples):
   dictionary = {}
   for sample in samples:
    key, value = sample.split("->")
    dictionary[key] = value
   return dictionary