input: Write a python function to find the longest common substring in a list of strings.
  assert longest_common_substring(["hello", "hi", "hell"]) == "h"
  assert longest_common_substring(["interspecies", "interstellar", "interstate"]) == "inters"
  assert longest_common_substring(["throne", "throne"]) == "throne"
  assert longest_common_substring(["throne", "dungeon"]) == ""
  assert longest_common_substring(["apple", "ape", "april"]) == "ap"
output: def longest_common_substring(strings):
      if not strings:
          return ""
      
      shortest_str = min(strings, key=len)
      longest_substring = ""
      
      for i in range(len(shortest_str)):
          for j in range(i + 1, len(shortest_str) + 1):
              candidate = shortest_str[i:j]
              if all(candidate in s for s in strings):
                  if len(candidate) > len(longest_substring):
                      longest_substring = candidate
                      
      return longest_substring