



'''simple docstring'''

import numpy as np

snake_case_			=     [
    ["""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 	a__     :


	def __init__(self : List[str]      )     ->			None:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE  :						Any      					= np.array(__UpperCAmelCase      )


	def 				lowercase__  (self : Any,					__UpperCAmelCase : str      )     ->			np.ndarray:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE					,					SCREAMING_SNAKE_CASE  :						Any      					= np.where(letter == self.SQUARE      )
					SCREAMING_SNAKE_CASE  :						Optional[Any]      					= np.concatenate([indexa + 1, indexa + 1]      )
					return indexes


	def 				lowercase__  (self : Union[str, Any],					__UpperCAmelCase : int,					__UpperCAmelCase : int      )     ->			str:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE  :						int      					= self.SQUARE[indexa - 1, indexa - 1]
					return letter


	def 				lowercase__  (self : Dict,					__UpperCAmelCase : str      )     ->			str:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE  :						Dict      					= message.lower()
					SCREAMING_SNAKE_CASE  :						Union[str, Any]      					= message.replace(''' ''',					''''''      )
					SCREAMING_SNAKE_CASE  :						Any      					= message.replace('''j''',					'''i'''      )

					SCREAMING_SNAKE_CASE  :						str      					= np.empty((2, len(__UpperCAmelCase      ))      )
					for letter_index in range(len(__UpperCAmelCase      )      ):
									SCREAMING_SNAKE_CASE  :						int      					= self.letter_to_numbers(message[letter_index]      )

									SCREAMING_SNAKE_CASE  :						str      					= numbers[0]
									SCREAMING_SNAKE_CASE  :						Optional[Any]      					= numbers[1]

					SCREAMING_SNAKE_CASE  :						Optional[int]      					= first_step.reshape(2 * len(__UpperCAmelCase      )      )
					SCREAMING_SNAKE_CASE  :						List[Any]      					= ''''''
					for numbers_index in range(len(__UpperCAmelCase      )      ):
									SCREAMING_SNAKE_CASE  :						Union[str, Any]      					= int(second_step[numbers_index * 2]      )
									SCREAMING_SNAKE_CASE  :						Union[str, Any]      					= int(second_step[(numbers_index * 2) + 1]      )
									SCREAMING_SNAKE_CASE  :						List[Any]      					= self.numbers_to_letter(__UpperCAmelCase,					__UpperCAmelCase      )
									SCREAMING_SNAKE_CASE  :						Dict      					= encoded_message + letter

					return encoded_message






	def 				lowercase__  (self : Tuple,					__UpperCAmelCase : str      )     ->			str:

					"""simple docstring"""

					SCREAMING_SNAKE_CASE  :						List[str]      					= message.lower()
					message.replace(''' ''',					''''''      )
					SCREAMING_SNAKE_CASE  :						List[Any]      					= np.empty(2 * len(__UpperCAmelCase      )      )
					for letter_index in range(len(__UpperCAmelCase      )      ):
									SCREAMING_SNAKE_CASE  :						str      					= self.letter_to_numbers(message[letter_index]      )
									SCREAMING_SNAKE_CASE  :						Dict      					= numbers[0]
									SCREAMING_SNAKE_CASE  :						Optional[int]      					= numbers[1]

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

					return decoded_message









'''simple docstring'''

from ..utils import DummyObject, requires_backends


class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Dict	    =     ["torch", "transformers", "onnx"]


	def __init__(self : List[str],					*__UpperCAmelCase : Dict,					**__UpperCAmelCase : List[Any]      )     ->			Union[str, Any]:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : Optional[Any],					*__UpperCAmelCase : Tuple,					**__UpperCAmelCase : int      )     ->			int:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : Any,					*__UpperCAmelCase : Tuple,					**__UpperCAmelCase : Tuple      )     ->			Tuple:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Any	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Dict,					*__UpperCAmelCase : Union[str, Any],					**__UpperCAmelCase : Optional[Any]      )     ->			int:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : Any,					*__UpperCAmelCase : Tuple,					**__UpperCAmelCase : List[str]      )     ->			Optional[int]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : int,					*__UpperCAmelCase : List[Any],					**__UpperCAmelCase : Any      )     ->			Optional[Any]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Optional[Any]	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Dict,					*__UpperCAmelCase : Dict,					**__UpperCAmelCase : Any      )     ->			List[str]:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : Tuple,					*__UpperCAmelCase : Union[str, Any],					**__UpperCAmelCase : int      )     ->			Optional[Any]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : Union[str, Any],					*__UpperCAmelCase : List[str],					**__UpperCAmelCase : str      )     ->			Optional[int]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Tuple	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Union[str, Any],					*__UpperCAmelCase : Optional[int],					**__UpperCAmelCase : List[Any]      )     ->			Tuple:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : str,					*__UpperCAmelCase : Optional[int],					**__UpperCAmelCase : Tuple      )     ->			str:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : int,					*__UpperCAmelCase : List[Any],					**__UpperCAmelCase : List[str]      )     ->			Tuple:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    List[Any]	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Dict,					*__UpperCAmelCase : Optional[Any],					**__UpperCAmelCase : int      )     ->			List[str]:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : List[str],					*__UpperCAmelCase : Union[str, Any],					**__UpperCAmelCase : Dict      )     ->			Union[str, Any]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : Any,					*__UpperCAmelCase : List[str],					**__UpperCAmelCase : List[Any]      )     ->			Dict:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )



class 	a__     (				metaclass=_lowercase	):
	__magic_name__		:    Dict	    =     ["torch", "transformers", "onnx"]


	def __init__(self : Tuple,					*__UpperCAmelCase : Optional[Any],					**__UpperCAmelCase : List[str]      )     ->			Any:

					"""simple docstring"""

					requires_backends(self,					['''torch''', '''transformers''', '''onnx''']      )


	@classmethod
	def 				lowercase__  (cls : Tuple,					*__UpperCAmelCase : Any,					**__UpperCAmelCase : Union[str, Any]      )     ->			Optional[int]:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )






	@classmethod
	def 				lowercase__  (cls : Optional[Any],					*__UpperCAmelCase : Union[str, Any],					**__UpperCAmelCase : Optional[Any]      )     ->			int:

					"""simple docstring"""

					requires_backends(cls,					['''torch''', '''transformers''', '''onnx''']      )




