input: Write a function to find the pair of strings with the longest common substring from a list of strings.
  assert longest_common_substring(["quick", "quack", "quadrant", "quest", "quadricolor"]) == ["quadrant", "quadricolor"]
  assert longest_common_substring(["apple", "application", "apply", "aptitude", "apex"]) == ["apple", "application"]
  assert longest_common_substring(["dog", "cat", "fish", "bird"]) == [""]
output: def longest_common_substring(strings):
      def common_substr(s1, s2):
          len1, len2 = len(s1), len(s2)
          max_len = 0
          end_idx = 0
          dp = [[0] * (len2 + 1) for _ in range(len1 + 1)]
          
          for i in range(1, len1 + 1):
              for j in range(1, len2 + 1):
                  if s1[i - 1] == s2[j - 1]:
                      dp[i][j] = dp[i - 1][j - 1] + 1
                      if dp[i][j] > max_len:
                          max_len = dp[i][j]
                          end_idx = i
          return s1[end_idx - max_len:end_idx]
      
      max_common = ""
      pair = ["", ""]
      
      for i in range(len(strings)):
          for j in range(i + 1, len(strings)):
              substr = common_substr(strings[i], strings[j])
              if len(substr) > len(max_common):
                  max_common = substr
                  pair = [strings[i], strings[j]]
      
      return pair if max_common else [""]