input: def build_dictionary(samples: List[str]) -> Dict[str, str]:
      """ Builds a dictionary from string to string from the given list of samples.
      Each sample in the list is a string formatted as "key->value".
      >>> build_dictionary(["apple->red", "banana->yellow", "cherry->red"])
      {'apple': 'red', 'banana': 'yellow', 'cherry': 'red'}
      """
output:     result = {}
      for sample in samples:
          key, value = sample.split("->")
          result[key] = value
      return result