





'''simple docstring'''







import numpy as np

snake_case_  :							int            =	[
    ["""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[Any] )       ->							None:







													"""simple docstring"""
													UpperCAmelCase_      :   Any      =	np.array(lowerCAmelCase__ )

							def      UpperCAmelCase__						(				self				:  Dict							,  __magic_name__				:  List[Any] )       ->							np.ndarray:







													"""simple docstring"""
													UpperCAmelCase_      :   str      =	np.where(letter == self.SQUARE )
													UpperCAmelCase_      :   Union[str, Any]      =	np.concatenate([indexa + 1, indexa + 1] )
													return indexes

							def      UpperCAmelCase__						(				self				:  Optional[int]							,  __magic_name__				:  Any							,  __magic_name__				:  Optional[Any] )       ->							str:







													"""simple docstring"""
													return self.SQUARE[indexa - 1, indexa - 1]

							def      UpperCAmelCase__						(				self				:  Optional[Any]							,  __magic_name__				:  List[str] )       ->							str:







													"""simple docstring"""
													UpperCAmelCase_      :   str      =	message.lower()
													UpperCAmelCase_      :   List[Any]      =	message.replace('''j'''							,  '''i''' )

													UpperCAmelCase_      :   List[str]      =	""""""
													for letter_index in range(len(lowerCAmelCase__ ) ):
																			if message[letter_index] != " ":
																									UpperCAmelCase_      :   Dict      =	self.letter_to_numbers(message[letter_index] )
																									UpperCAmelCase_      :   List[Any]      =	encoded_message + str(numbers[0] ) + str(numbers[1] )
																			elif message[letter_index] == " ":
																									UpperCAmelCase_      :   List[Any]      =	encoded_message + """ """

													return encoded_message



							def      UpperCAmelCase__						(				self				:  Dict							,  __magic_name__				:  Optional[int] )       ->							str:







													"""simple docstring"""
													UpperCAmelCase_      :   List[str]      =	message.replace(''' '''							,  '''  ''' )
													UpperCAmelCase_      :   Dict      =	""""""
													for numbers_index in range(int(len(lowerCAmelCase__ ) / 2 ) ):
																			if message[numbers_index * 2] != " ":
																									UpperCAmelCase_      :   Tuple      =	message[numbers_index * 2]
																									UpperCAmelCase_      :   List[str]      =	message[numbers_index * 2 + 1]

																									UpperCAmelCase_      :   Dict      =	self.numbers_to_letter(int(lowerCAmelCase__ )							,  int(lowerCAmelCase__ ) )
																									UpperCAmelCase_      :   Union[str, Any]      =	decoded_message + letter
																			elif message[numbers_index * 2] == " ":
																									UpperCAmelCase_      :   Dict      =	decoded_message + """ """

													return decoded_message






'''simple docstring'''

from __future__ import annotations

_lowerCamelCase :				Optional[int]														= """Alexander Joslin"""



def  _lowerCAmelCase				(				__a      )  ->      int:
     '''simple docstring'''







     if number <= 0:
          _UpperCamelCase  :Optional[Any]       =F'''n must be greater than 0. Got n = {number}'''
          raise ValueError(__a      )

     _UpperCamelCase  :Optional[Any]       =[number + 1] * (number + 1)

     # starting position
     _UpperCamelCase  :int       =0
     for i in range(1			,      __a      ):
          _UpperCamelCase  :List[str]       =min(table[i + 1]			,      table[i] + 1      )
          # check if out of bounds
          if i * 2 <= number:
               _UpperCamelCase  :int       =min(table[i * 2]			,      table[i] + 1      )
          # check if out of bounds
          if i * 3 <= number:
               _UpperCamelCase  :Tuple       =min(table[i * 3]			,      table[i] + 1      )
     return table[number]


if __name__ == "__main__":
      import doctest

      doctest.testmod()