






from __future__ import annotations

from collections import deque
from enum import Enum
from math import atana, degrees
from sys import maxsize






class 	lowercase_      (			lowercase     ):






      '''simple docstring'''




      __snake_case  						=						1
      __snake_case  						=						2
      __snake_case  						=						3







      def __repr__(   self   :		List[Any]						)					->int:




       """simple docstring"""


       return F"""{self.__class__.__name__}.{self.name}"""
def 		_a					(   a				:tuple[int, int]			,							a				:int			,							a				:int				)							->    float:
 a						,  a							=   point
 return degrees(atana(y - miny			,							x - minx				)				)
def 		_a					(   a				:tuple[int, int]			,							a				:tuple[int, int]			,							a				:tuple[int, int]				)							->    Direction:
 a						,  a							=   starting
 a						,  a							=   via
 a						,  a							=   target
 a							=   degrees(atana(ya - ya			,							xa - xa				)				)
 via_angle %= 360
 a							=   degrees(atana(ya - ya			,							xa - xa				)				)
 target_angle %= 360
 # t-
 #  \ \
 #   \ v
 #    \|
 #     s
 # via_angle is always lower than target_angle, if direction is left.
 # If they are same, it means they are on a same line of convex hull.
 if target_angle > via_angle:
  return Direction.left
 elif target_angle == via_angle:
  return Direction.straight
 else:
  return Direction.right

def 		_a					(   a				:list[tuple[int, int]]				)							->    list[tuple[int, int]]:

 if len(a				) <= 2:
  # There is no convex hull
  raise ValueError('''graham_scan: argument must contain more than 3 points.'''				)
 if len(a				) == 3:
  return points
 # find the lowest and the most left point
 a							=   0
 a						,  a							=   maxsize, maxsize
 for i, point in enumerate(a				):
  a							=   point[0]
  a							=   point[1]
  if y < miny:
   a							=   y
   a							=   x
   a							=   i
  if y == miny and x < minx:
   a							=   x
   a							=   i

    # remove the lowest and the most left point from points for preparing for sort
 points.pop(a				)

 a							=   sorted(a			,							key=lambda a				: angle_comparer(a			,							a			,							a				)				)
 # This insert actually costs complexity,
 # and you should instead add (minx, miny) into stack later.
 # I'm using insert just for easy understanding.
 sorted_points.insert(0			,							(minx, miny)				)

 a							=   deque()
 stack.append(sorted_points[0]				)
 stack.append(sorted_points[1]				)
 stack.append(sorted_points[2]				)
 # In any ways, the first 3 points line are towards left.
 # Because we sort them the angle from minx, miny.
 a							=   Direction.left

 for i in range(3			,							len(a				)				):
  while True:
   a							=   stack[-2]
   a							=   stack[-1]
   a							=   sorted_points[i]
   a							=   check_direction(a			,							a			,							a				)

   if next_direction == Direction.left:
    a							=   Direction.left
    break
   if next_direction == Direction.straight:
    if current_direction == Direction.left:
     # We keep current_direction as left.
     # Because if the straight line keeps as straight,
     # we want to know if this straight line is towards left.
     break
    elif current_direction == Direction.right:
     # If the straight line is towards right,
     # every previous points on those straigh line is not convex hull.
     stack.pop()
   if next_direction == Direction.right:
    stack.pop()
  stack.append(sorted_points[i]				)
 return list(a				)










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 	lowercase_      :






      '''simple docstring'''




      def __init__(   self   :		Optional[Any]						)					->None:




       """simple docstring"""


       a							=   np.array(__UpperCAmelCase						)







      def    __lowerCAmelCase      (   self   :		List[str]				,      __UpperCAmelCase   :		str						)					->np.ndarray:




       """simple docstring"""


       a						,  a							=   np.where(letter == self.SQUARE						)
       a							=   np.concatenate([indexa + 1, indexa + 1]						)
       return indexes







      def    __lowerCAmelCase      (   self   :		int				,      __UpperCAmelCase   :		int				,      __UpperCAmelCase   :		int						)					->str:




       """simple docstring"""


       return self.SQUARE[indexa - 1, indexa - 1]







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




       """simple docstring"""


       a							=   message.lower()
       a							=   message.replace('''j'''				,      '''i'''						)

       a							=   ''''''
       for letter_index in range(len(__UpperCAmelCase						)						):
        if message[letter_index] != " ":
         a							=   self.letter_to_numbers(message[letter_index]						)
         a							=   encoded_message + str(numbers[0]						) + str(numbers[1]						)
        elif message[letter_index] == " ":
         a							=   encoded_message + ''' '''

       return encoded_message







      def    __lowerCAmelCase      (   self   :		Any				,      __UpperCAmelCase   :		str						)					->str:




       """simple docstring"""


       a							=   message.replace(''' '''				,      '''  '''						)
       a							=   ''''''
       for numbers_index in range(int(len(__UpperCAmelCase						) / 2						)						):
        if message[numbers_index * 2] != " ":
         a							=   message[numbers_index * 2]
         a							=   message[numbers_index * 2 + 1]

         a							=   self.numbers_to_letter(int(__UpperCAmelCase						)				,      int(__UpperCAmelCase						)						)
         a							=   decoded_message + letter
        elif message[numbers_index * 2] == " ":
         a							=   decoded_message + ''' '''

       return decoded_message


