'''simple docstring'''
def 				__UpperCamelCase (					__UpperCAmelCase  :					Any ,   __UpperCAmelCase  :					int ,   __UpperCAmelCase  :					Optional[Any]			)							->	list[int]:
  if hue < 0 or hue > 360:
    raise Exception('''hue should be between 0 and 360'''			)

  if saturation < 0 or saturation > 1:
    raise Exception('''saturation should be between 0 and 1'''			)

  if value < 0 or value > 1:
    raise Exception('''value should be between 0 and 1'''			)

  lowercase				:							Tuple									=   value * saturation
  lowercase				:							int									=   hue / 60
  lowercase				:							Optional[int]									=   chroma * (1 - abs(hue_section % 2 - 1			))
  lowercase				:							Union[str, Any]									=   value - chroma

  if hue_section >= 0 and hue_section <= 1:
    lowercase				:							Any									=   round(255 * (chroma + match_value)			)
    lowercase				:							Optional[Any]									=   round(255 * (second_largest_component + match_value)			)
    lowercase				:							Optional[Any]									=   round(255 * (match_value)			)
  elif hue_section > 1 and hue_section <= 2:
    lowercase				:							Dict									=   round(255 * (second_largest_component + match_value)			)
    lowercase				:							Optional[int]									=   round(255 * (chroma + match_value)			)
    lowercase				:							int									=   round(255 * (match_value)			)
  elif hue_section > 2 and hue_section <= 3:
    lowercase				:							Dict									=   round(255 * (match_value)			)
    lowercase				:							str									=   round(255 * (chroma + match_value)			)
    lowercase				:							Dict									=   round(255 * (second_largest_component + match_value)			)
  elif hue_section > 3 and hue_section <= 4:
    lowercase				:							Any									=   round(255 * (match_value)			)
    lowercase				:							Any									=   round(255 * (second_largest_component + match_value)			)
    lowercase				:							Tuple									=   round(255 * (chroma + match_value)			)
  elif hue_section > 4 and hue_section <= 5:
    lowercase				:							Optional[int]									=   round(255 * (second_largest_component + match_value)			)
    lowercase				:							List[str]									=   round(255 * (match_value)			)
    lowercase				:							Dict									=   round(255 * (chroma + match_value)			)
  else:
    lowercase				:							Union[str, Any]									=   round(255 * (chroma + match_value)			)
    lowercase				:							Any									=   round(255 * (match_value)			)
    lowercase				:							Union[str, Any]									=   round(255 * (second_largest_component + match_value)			)

  return [red, green, blue]







def 				__UpperCamelCase (					__UpperCAmelCase  :					Any ,   __UpperCAmelCase  :					List[str] ,   __UpperCAmelCase  :					str			)							->	list[float]:
  if red < 0 or red > 255:
    raise Exception('''red should be between 0 and 255'''			)

  if green < 0 or green > 255:
    raise Exception('''green should be between 0 and 255'''			)

  if blue < 0 or blue > 255:
    raise Exception('''blue should be between 0 and 255'''			)

  lowercase				:							Optional[Any]									=   red / 255
  lowercase				:							str									=   green / 255
  lowercase				:							List[Any]									=   blue / 255
  lowercase				:							Any									=   max(lowerCAmelCase_ ,   lowerCAmelCase_ ,   lowerCAmelCase_			)
  lowercase				:							Any									=   value - min(lowerCAmelCase_ ,   lowerCAmelCase_ ,   lowerCAmelCase_			)
  lowercase				:							Optional[int]									=   0 if value == 0 else chroma / value

  if chroma == 0:
    lowercase				:							List[str]									=   0.0
  elif value == float_red:
    lowercase				:							List[str]									=   60 * (0 + (float_green - float_blue) / chroma)
  elif value == float_green:
    lowercase				:							Union[str, Any]									=   60 * (2 + (float_blue - float_red) / chroma)
  else:
    lowercase				:							Tuple									=   60 * (4 + (float_red - float_green) / chroma)

  lowercase				:							Optional[Any]									=   (hue + 360) % 360

  return [hue, saturation, value]







def 				__UpperCamelCase (					__UpperCAmelCase  :					Union[str, Any] ,   __UpperCAmelCase  :					int			)							->	bool:
  lowercase				:							Any									=   abs(hsv_a[0] - hsv_a[0]			) < 0.2
  lowercase				:							Any									=   abs(hsv_a[1] - hsv_a[1]			) < 0.002
  lowercase				:							str									=   abs(hsv_a[2] - hsv_a[2]			) < 0.002

  return check_hue and check_saturation and check_value



import numpy as np

_UpperCAmelCase      :	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 					snake_case__:







						'''simple docstring'''




						def __init__(					self				)       ->     None:
										lowerCAmelCase_			:   List[Any]     					=					np.array(__lowercase				)




						def     lowercase_			(					self ,    __lowercase				)       ->     np.ndarray:
										lowerCAmelCase_					,	lowerCAmelCase_			:   List[str]     					=					np.where(letter == self.SQUARE				)
										lowerCAmelCase_			:   Union[str, Any]     					=					np.concatenate([indexa + 1, indexa + 1]				)
										return indexes




						def     lowercase_			(					self ,    __lowercase ,    __lowercase				)       ->     str:
										return self.SQUARE[indexa - 1, indexa - 1]




						def     lowercase_			(					self ,    __lowercase				)       ->     str:
										lowerCAmelCase_			:   Dict     					=					message.lower()
										lowerCAmelCase_			:   Any     					=					message.replace('''j''' ,    '''i'''				)

										lowerCAmelCase_			:   Optional[Any]     					=					''''''
										for letter_index in range(len(__lowercase				)				):
														if message[letter_index] != " ":
																		lowerCAmelCase_			:   Optional[Any]     					=					self.letter_to_numbers(message[letter_index]				)
																		lowerCAmelCase_			:   List[Any]     					=					encoded_message + str(numbers[0]				) + str(numbers[1]				)
														elif message[letter_index] == " ":
																		lowerCAmelCase_			:   Optional[Any]     					=					encoded_message + ''' '''

										return encoded_message




						def     lowercase_			(					self ,    __lowercase				)       ->     str:
										lowerCAmelCase_			:   List[str]     					=					message.replace(''' ''' ,    '''  '''				)
										lowerCAmelCase_			:   Union[str, Any]     					=					''''''
										for numbers_index in range(int(len(__lowercase				) / 2				)				):
														if message[numbers_index * 2] != " ":
																		lowerCAmelCase_			:   Any     					=					message[numbers_index * 2]
																		lowerCAmelCase_			:   Dict     					=					message[numbers_index * 2 + 1]

																		lowerCAmelCase_			:   Dict     					=					self.numbers_to_letter(int(__lowercase				) ,    int(__lowercase				)				)
																		lowerCAmelCase_			:   Tuple     					=					decoded_message + letter
														elif message[numbers_index * 2] == " ":
																		lowerCAmelCase_			:   List[str]     					=					decoded_message + ''' '''

										return decoded_message