






import numpy as np

UpperCamelCase								=		[
    ["a", "b", "c", "d", "e"],
    ["f", "g", "h", "i", "k"],
    ["l", "m", "n", "o", "p"],
    ["q", "r", "s", "t", "u"],
    ["v", "w", "x", "y", "z"],
]

class 				lowerCAmelCase_	:


				def __init__(					self      ):
											_lowercase							:   Any 							=   np.array(_lowerCAmelCase      )


				def 						__a					(					self ,						_lowerCAmelCase      ):
											_lowercase							,							_lowercase							:   List[str] 							=   np.where(letter == self.SQUARE      )
											_lowercase							:   Optional[int] 							=   np.concatenate([indexa + 1, indexa + 1]      )
											return indexes


				def 						__a					(					self ,						_lowerCAmelCase ,						_lowerCAmelCase      ):
											_lowercase							:   int 							=   self.SQUARE[indexa - 1, indexa - 1]
											return letter


				def 						__a					(					self ,						_lowerCAmelCase      ):
											_lowercase							:   int 							=   message.lower()
											_lowercase							:   Optional[Any] 							=   message.replace(' ' ,						''      )
											_lowercase							:   Optional[Any] 							=   message.replace('j' ,						'i'      )

											_lowercase							:   Optional[int] 							=   np.empty((2, len(_lowerCAmelCase      ))      )
											for letter_index in range(len(_lowerCAmelCase      )      ):
																		_lowercase							:   Any 							=   self.letter_to_numbers(message[letter_index]      )

																		_lowercase							:   Tuple 							=   numbers[0]
																		_lowercase							:   int 							=   numbers[1]

											_lowercase							:   int 							=   first_step.reshape(2 * len(_lowerCAmelCase      )      )
											_lowercase							:   Tuple 							=   ''
											for numbers_index in range(len(_lowerCAmelCase      )      ):
																		_lowercase							:   int 							=   int(second_step[numbers_index * 2]      )
																		_lowercase							:   List[Any] 							=   int(second_step[(numbers_index * 2) + 1]      )
																		_lowercase							:   Optional[int] 							=   self.numbers_to_letter(_lowerCAmelCase ,						_lowerCAmelCase      )
																		_lowercase							:   List[Any] 							=   encoded_message + letter

											return encoded_message


				def 						__a					(					self ,						_lowerCAmelCase      ):
											_lowercase							:   Tuple 							=   message.lower()
											message.replace(' ' ,						''      )
											_lowercase							:   Optional[Any] 							=   np.empty(2 * len(_lowerCAmelCase      )      )
											for letter_index in range(len(_lowerCAmelCase      )      ):
																		_lowercase							:   List[Any] 							=   self.letter_to_numbers(message[letter_index]      )
																		_lowercase							:   int 							=   numbers[0]
																		_lowercase							:   Union[str, Any] 							=   numbers[1]

											_lowercase							:   Optional[int] 							=   first_step.reshape((2, len(_lowerCAmelCase      ))      )
											_lowercase							:   Tuple 							=   ''
											for numbers_index in range(len(_lowerCAmelCase      )      ):
																		_lowercase							:   Tuple 							=   int(second_step[0, numbers_index]      )
																		_lowercase							:   Dict 							=   int(second_step[1, numbers_index]      )
																		_lowercase							:   List[Any] 							=   self.numbers_to_letter(_lowerCAmelCase ,						_lowerCAmelCase      )
																		_lowercase							:   Dict 							=   decoded_message + letter

											return decoded_message







def      A__					(			__A  :						str     ,				__A  :						str			)					->str:

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

      __A    =len(__A			)
      __A    =len(__A			)

      __A    =[[0] * (texta_length + 1) for _ in range(texta_length + 1			)]
      __A    =0
      __A    =0

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

      return texta[ans_index - ans_length : ans_index]


if __name__ == "__main__":
   import doctest

   doctest.testmod()


