code: 
  '''simple docstring'''
  
  from __future__ import annotations
  
  
  def 	_UpperCAmelCase				(  _lowerCamelCase						:       str  ,      _lowerCamelCase						:       dict[str, str]		)    ->						str:
    _lowerCAmelCase				,					_lowerCAmelCase				,					_lowerCAmelCase       :  int   				=					"""""", """""", """"""
    _lowerCAmelCase       :  str   				=					[]
  
    for character in message_part:
      tmp.append(character_to_number[character]		)
  
    for each in tmp:
      one += each[0]
      two += each[1]
      three += each[2]
  
    return one + two + three
  
  
  def 	_UpperCAmelCase				(  _lowerCamelCase						:       str  ,      _lowerCamelCase						:       dict[str, str]		)    ->						tuple[str, str, str]:
    _lowerCAmelCase				,					_lowerCAmelCase       :  Tuple   				=					"""""", """"""
    _lowerCAmelCase       :  List[str]   				=					[]
  
    for character in message_part:
      this_part += character_to_number[character]
  
    for digit in this_part:
      tmp += digit
      if len(_UpperCamelCase		) == len(_UpperCamelCase		):
        result.append(_UpperCamelCase		)
        _lowerCAmelCase       :  List[str]   				=					""""""
  
    return result[0], result[1], result[2]
  
  
  def 	_UpperCAmelCase				(  _lowerCamelCase						:       str  ,      _lowerCamelCase						:       str		)    ->						tuple[str, str, dict[str, str], dict[str, str]]:
    _lowerCAmelCase       :  Tuple   				=					alphabet.replace(""" """  ,      """"""		).upper()
    _lowerCAmelCase       :  Any   				=					message.replace(""" """  ,      """"""		).upper()
  
    # Check length and characters
    if len(_UpperCamelCase		) != 27:
      raise KeyError("""Length of alphabet has to be 27."""		)
    for each in message:
      if each not in alphabet:
        raise ValueError("""Each message character has to be included in alphabet!"""		)
  
      # Generate dictionares
    _lowerCAmelCase       :  Union[str, Any]   				=					(
        """111""",
        """112""",
        """113""",
        """121""",
        """122""",
        """123""",
        """131""",
        """132""",
        """133""",
        """211""",
        """212""",
        """213""",
        """221""",
        """222""",
        """223""",
        """231""",
        """232""",
        """233""",
        """311""",
        """312""",
        """313""",
        """321""",
        """322""",
        """323""",
        """331""",
        """332""",
        """333""",
    )
    _lowerCAmelCase       :  Tuple   				=					{}
    _lowerCAmelCase       :  Dict   				=					{}
    for letter, number in zip(_UpperCamelCase  ,      _UpperCamelCase		):
      _lowerCAmelCase       :  List[str]   				=					number
      _lowerCAmelCase       :  List[Any]   				=					letter
  
    return message, alphabet, character_to_number, number_to_character
  
  
  def 	_UpperCAmelCase				(  _lowerCamelCase						:       str  ,      _lowerCamelCase						:       str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ."  ,      _lowerCamelCase						:       int = 5		)    ->						str:
    _lowerCAmelCase				,					_lowerCAmelCase				,					_lowerCAmelCase				,					_lowerCAmelCase       :  List[str]   				=					__prepare(
        _UpperCamelCase  ,      _UpperCamelCase		)
    _lowerCAmelCase				,					_lowerCAmelCase       :  Tuple   				=					"""""", """"""
  
    for i in range(0  ,      len(_UpperCamelCase		) + 1  ,      _UpperCamelCase		):
      encrypted_numeric += __encrypt_part(
          message[i : i + period]  ,      _UpperCamelCase		)
  
    for i in range(0  ,      len(_UpperCamelCase		)  ,      3		):
      encrypted += number_to_character[encrypted_numeric[i : i + 3]]
  
    return encrypted
  
  
  def 	_UpperCAmelCase				(  _lowerCamelCase						:       str  ,      _lowerCamelCase						:       str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ."  ,      _lowerCamelCase						:       int = 5		)    ->						str:
    _lowerCAmelCase				,					_lowerCAmelCase				,					_lowerCAmelCase				,					_lowerCAmelCase       :  Optional[Any]   				=					__prepare(
        _UpperCamelCase  ,      _UpperCamelCase		)
    _lowerCAmelCase       :  Optional[Any]   				=					[]
    _lowerCAmelCase       :  Dict   				=					""""""
  
    for i in range(0  ,      len(_UpperCamelCase		) + 1  ,      _UpperCamelCase		):
      _lowerCAmelCase				,					_lowerCAmelCase				,					_lowerCAmelCase       :  Tuple   				=					__decrypt_part(message[i : i + period]  ,      _UpperCamelCase		)
  
      for j in range(0  ,      len(_UpperCamelCase		)		):
        decrypted_numeric.append(a[j] + b[j] + c[j]		)
  
    for each in decrypted_numeric:
      decrypted += number_to_character[each]
  
    return decrypted
  
  
  if __name__ == "__main__":
       UpperCamelCase_     			= "DEFEND THE EAST WALL OF THE CASTLE."
       UpperCamelCase_     			= encrypt_message(msg, """EPSDUCVWYM.ZLKXNBTFGORIJHAQ""")
       UpperCamelCase_     			= decrypt_message(encrypted, """EPSDUCVWYM.ZLKXNBTFGORIJHAQ""")
       print(F'Encrypted: {encrypted}\nDecrypted: {decrypted}')
  
  
  
style_context: 
  '''simple docstring'''
  
  import random
  
  
  class   a_  :
  
  
  
  
         def __init__(     self   ,   snake_case_   ,   snake_case_  ):
           _lowerCAmelCase       :  List[str]   				=					x
           _lowerCAmelCase       :  List[str]   				=					y
  
  
  
  
         def 							__UpperCamelCase       (     self  ):
           return (self.x**2 + self.y**2) <= 1
  
  
  
  
  
  
  
         @classmethod
         def 							__UpperCamelCase       (     cls  ):
           return cls(x=random.random()   ,   y=random.random()  )
  
  
  
  def 	_UpperCAmelCase				(  _lowerCamelCase						:       int		)    ->						float:
    if number_of_simulations < 1:
      raise ValueError("""At least one simulation is necessary to estimate PI."""		)
  
    _lowerCAmelCase       :  Tuple   				=					0
    for _ in range(_lowerCamelCase		):
      _lowerCAmelCase       :  Union[str, Any]   				=					Point.random_unit_square()
  
      if random_point.is_in_unit_circle():
        number_in_unit_circle += 1
  
    return 4 * number_in_unit_circle / number_of_simulations
  
  
  if __name__ == "__main__":
       # import doctest
  
       # doctest.testmod()
       from math import pi
  
       UpperCamelCase_     			=       """Please enter the desired number of Monte Carlo simulations: """
       UpperCamelCase_     			=       estimate_pi(int(input(prompt).strip()))
       print(F'An estimate of PI is {my_pi} with an error of {abs(my_pi - pi)}')
  
  
  