






import numpy as np

lowerCamelCase      :       Dict    =						[
    ['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 				_UpperCamelCase      :


      def __init__(						self						)->						None:
           __lowerCAmelCase             =       np.array(__a						)


      def 			__UpperCAmelCase		(						self       ,    __UpperCamelCase						)->						np.ndarray:
           __lowerCAmelCase             =       np.where(letter == self.SQUARE						)
           __lowerCAmelCase             =       np.concatenate([indexa + 1, indexa + 1]						)
           return indexes


      def 			__UpperCAmelCase		(						self       ,    __UpperCamelCase       ,    __UpperCamelCase						)->						str:
           __lowerCAmelCase             =       self.SQUARE[indexa - 1, indexa - 1]
           return letter


      def 			__UpperCAmelCase		(						self       ,    __UpperCamelCase						)->						str:
           __lowerCAmelCase             =       message.lower()
           __lowerCAmelCase             =       message.replace(" "       ,    ""						)
           __lowerCAmelCase             =       message.replace("j"       ,    "i"						)

           __lowerCAmelCase             =       np.empty((2, len(__a						))						)
           for letter_index in range(len(__a						)						):
                __lowerCAmelCase             =       self.letter_to_numbers(message[letter_index]						)

                __lowerCAmelCase             =       numbers[0]
                __lowerCAmelCase             =       numbers[1]

           __lowerCAmelCase             =       first_step.reshape(2 * len(__a						)						)
           __lowerCAmelCase             =       """"""
           for numbers_index in range(len(__a						)						):
                __lowerCAmelCase             =       int(second_step[numbers_index * 2]						)
                __lowerCAmelCase             =       int(second_step[(numbers_index * 2) + 1]						)
                __lowerCAmelCase             =       self.numbers_to_letter(__a       ,    __a						)
                __lowerCAmelCase             =       encoded_message + letter

           return encoded_message


      def 			__UpperCAmelCase		(						self       ,    __UpperCamelCase						)->						str:
           __lowerCAmelCase             =       message.lower()
           message.replace(" "       ,    ""						)
           __lowerCAmelCase             =       np.empty(2 * len(__a						)						)
           for letter_index in range(len(__a						)						):
                __lowerCAmelCase             =       self.letter_to_numbers(message[letter_index]						)
                __lowerCAmelCase             =       numbers[0]
                __lowerCAmelCase             =       numbers[1]

           __lowerCAmelCase             =       first_step.reshape((2, len(__a						))						)
           __lowerCAmelCase             =       """"""
           for numbers_index in range(len(__a						)						):
                __lowerCAmelCase             =       int(second_step[0, numbers_index]						)
                __lowerCAmelCase             =       int(second_step[1, numbers_index]						)
                __lowerCAmelCase             =       self.numbers_to_letter(__a       ,    __a						)
                __lowerCAmelCase             =       decoded_message + letter

           return decoded_message










class   SCREAMING_SNAKE_CASE_			:




       '''simple docstring'''



       def __init__(						self				:				Tuple		,				__a				:				int							)					->Optional[int]:
          lowerCamelCase_						:   Optional[Any]		= n
          lowerCamelCase_						:   Dict		= [None] * self.n
          lowerCamelCase_						:   int		= 0  # index of the first element
          lowerCamelCase_						:   str		= 0
          lowerCamelCase_						:   Optional[Any]		= 0



       def __len__(						self				:				List[str]							)					->int:
          return self.size



       def 				_lowerCAmelCase							(						self				:				str							)					->bool:
          return self.size == 0



       def 				_lowerCAmelCase							(						self				:				str							)					->Any:
          return False if self.is_empty() else self.array[self.front]



       def 				_lowerCAmelCase							(						self				:				Union[str, Any]		,				__a				:				int							)					->List[Any]:
          if self.size >= self.n:
             raise Exception("""QUEUE IS FULL"""							)

          lowerCamelCase_						:   Tuple		= data
          lowerCamelCase_						:   Tuple		= (self.rear + 1) % self.n
          self.size += 1
          return self




       def 				_lowerCAmelCase							(						self				:				Tuple							)					->int:
          if self.size == 0:
             raise Exception("""UNDERFLOW"""							)

          lowerCamelCase_						:   str		= self.array[self.front]
          lowerCamelCase_						:   str		= None
          lowerCamelCase_						:   Optional[Any]		= (self.front + 1) % self.n
          self.size -= 1
          return temp





