




def 							_UpperCAmelCase  (UpperCamelCase_ : str      ,    UpperCamelCase_ : str       ):

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

				_lowerCAmelCase    :    List[str]										=      len(UpperCamelCase_       )
				_lowerCAmelCase    :    Dict										=      len(UpperCamelCase_       )

				_lowerCAmelCase    :    Dict										=      [[0] * (texta_length + 1) for _ in range(texta_length + 1       )]
				_lowerCAmelCase    :    int										=      0
				_lowerCAmelCase    :    Optional[int]										=      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[Any]										=      1 + dp[i - 1][j - 1]
																if dp[i][j] > ans_length:
																				_lowerCAmelCase    :    Union[str, Any]										=      i
																				_lowerCAmelCase    :    Any										=      dp[i][j]

				return texta[ans_index - ans_length : ans_index]


if __name__ == "__main__":
	import doctest

	doctest.testmod()







from math import loga




def 							_UpperCAmelCase  (UpperCamelCase_ : int       ):
				'''simple docstring'''
				if a < 0:
								raise ValueError("""Input value must be a positive integer"""       )
				elif isinstance(UpperCamelCase_      ,    UpperCamelCase_       ):
								raise TypeError("""Input value must be a 'int' type"""       )
				return 0 if (a == 0) else int(loga(a & -a       )       )


if __name__ == "__main__":
	import doctest

	doctest.testmod()

