






"""simple docstring"""


def 	lowercase_				(			__UpperCAmelCase    ,		__UpperCAmelCase				)						->    str:

      if not (isinstance(__UpperCAmelCase    ,		__UpperCAmelCase				) and isinstance(__UpperCAmelCase    ,		__UpperCAmelCase				)):
            raise ValueError("""longest_common_substring() takes two strings for inputs"""				)

      lowerCAmelCase__      :			str   =	len(__UpperCAmelCase				)
      lowerCAmelCase__      :			List[Any]   =	len(__UpperCAmelCase				)

      lowerCAmelCase__      :			Optional[Any]   =	[[0] * (texta_length + 1) for _ in range(texta_length + 1				)]
      lowerCAmelCase__      :			Optional[int]   =	0
      lowerCAmelCase__      :			Optional[Any]   =	0

      for i in range(1    ,		texta_length + 1				):
            for j in range(1    ,		texta_length + 1				):
                  if texta[i - 1] == texta[j - 1]:
                        lowerCAmelCase__      :			List[str]   =	1 + dp[i - 1][j - 1]
                        if dp[i][j] > ans_length:
                              lowerCAmelCase__      :			List[Any]   =	i
                              lowerCAmelCase__      :			List[str]   =	dp[i][j]

      return texta[ans_index - ans_length : ans_index]


if __name__ == "__main__":
  import doctest

  doctest.testmod()











"""simple docstring"""


# This is the module that test_patching.py uses to test patch_submodule()

import os  # noqa: this is just for tests
import os as renamed_os  # noqa: this is just for tests
from os import path  # noqa: this is just for tests
from os import path as renamed_path  # noqa: this is just for tests
from os.path import join  # noqa: this is just for tests
from os.path import join as renamed_join  # noqa: this is just for tests


_A													=      open  # noqa: we just need to have a builtin inside this module to test it properly





