


'''simple docstring'''



import string




def 			_a			(		_lowercase      :			str						):





     '''simple docstring'''






     for key in range(len(string.ascii_uppercase						)						):
          __UpperCAmelCase			:				Optional[int]													=    ''''''
          for symbol in message:
               if symbol in string.ascii_uppercase:
                    __UpperCAmelCase			:				Optional[Any]													=    string.ascii_uppercase.find(_lowercase						)
                    __UpperCAmelCase			:				str													=    num - key
                    if num < 0:
                         __UpperCAmelCase			:				str													=    num + len(string.ascii_uppercase						)
                    __UpperCAmelCase			:				Optional[Any]													=    translated + string.ascii_uppercase[num]
               else:
                    __UpperCAmelCase			:				Optional[Any]													=    translated + symbol
          print(F'Decryption using Key #{key}: {translated}'						)




def 			_a			(		):





     '''simple docstring'''






     __UpperCAmelCase			:				Tuple													=    input('''Encrypted message: '''						)
     __UpperCAmelCase			:				Dict													=    message.upper()
     decrypt(_lowercase						)


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      main()



'''simple docstring'''



from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt




def 			_a			(		_lowercase      :			int						):





     '''simple docstring'''






     __UpperCAmelCase			:				int													=    int(number**0.5						)
     return number == sq * sq




def 			_a			(		_lowercase      :			int    ,      _lowercase      :			int    ,      _lowercase      :			int    ,      _lowercase      :			int    ,      _lowercase      :			int    ,      _lowercase      :			int						):





     '''simple docstring'''






     __UpperCAmelCase			:				int													=    x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
     __UpperCAmelCase			:				int													=    x_den * y_den * z_den
     __UpperCAmelCase			:				int													=    gcd(_lowercase    ,      _lowercase						)
     top //= hcf
     bottom //= hcf
     return top, bottom




def 			_a			(		_lowercase      :			int = 35						):





     '''simple docstring'''






     __UpperCAmelCase			:				set													=    set()
     __UpperCAmelCase			:				int
     __UpperCAmelCase			:				Fraction													=    Fraction(0						)
     __UpperCAmelCase			:				tuple[int, int]

     for x_num in range(1    ,      order + 1						):
          for x_den in range(x_num + 1    ,      order + 1						):
               for y_num in range(1    ,      order + 1						):
                    for y_den in range(y_num + 1    ,      order + 1						):
                         # n=1
                         __UpperCAmelCase			:				Optional[int]													=    x_num * y_den + x_den * y_num
                         __UpperCAmelCase			:				Dict													=    x_den * y_den
                         __UpperCAmelCase			:				List[Any]													=    gcd(_lowercase    ,      _lowercase						)
                         z_num //= hcf
                         z_den //= hcf
                         if 0 < z_num < z_den <= order:
                              __UpperCAmelCase			:				Dict													=    add_three(
                                  _lowercase    ,      _lowercase    ,      _lowercase    ,      _lowercase    ,      _lowercase    ,      _lowercase						)
                              unique_s.add(_lowercase						)

                         # n=2
                         __UpperCAmelCase			:				Optional[int]													=    (
                             x_num * x_num * y_den * y_den + x_den * x_den * y_num * y_num
                         )
                         __UpperCAmelCase			:				Any													=    x_den * x_den * y_den * y_den
                         if is_sq(_lowercase						) and is_sq(_lowercase						):
                              __UpperCAmelCase			:				List[Any]													=    int(sqrt(_lowercase						)						)
                              __UpperCAmelCase			:				Tuple													=    int(sqrt(_lowercase						)						)
                              __UpperCAmelCase			:				Union[str, Any]													=    gcd(_lowercase    ,      _lowercase						)
                              z_num //= hcf
                              z_den //= hcf
                              if 0 < z_num < z_den <= order:
                                   __UpperCAmelCase			:				Union[str, Any]													=    add_three(
                                       _lowercase    ,      _lowercase    ,      _lowercase    ,      _lowercase    ,      _lowercase    ,      _lowercase						)
                                   unique_s.add(_lowercase						)

                    # n=-1
                         __UpperCAmelCase			:				Union[str, Any]													=    x_num * y_num
                         __UpperCAmelCase			:				List[Any]													=    x_den * y_num + x_num * y_den
                         __UpperCAmelCase			:				Any													=    gcd(_lowercase    ,      _lowercase						)
                         z_num //= hcf
                         z_den //= hcf
                         if 0 < z_num < z_den <= order:
                              __UpperCAmelCase			:				Optional[Any]													=    add_three(
                                  _lowercase    ,      _lowercase    ,      _lowercase    ,      _lowercase    ,      _lowercase    ,      _lowercase						)
                              unique_s.add(_lowercase						)

                         # n=2
                         __UpperCAmelCase			:				Optional[Any]													=    x_num * x_num * y_num * y_num
                         __UpperCAmelCase			:				Dict													=    (
                             x_den * x_den * y_num * y_num + x_num * x_num * y_den * y_den
                         )
                         if is_sq(_lowercase						) and is_sq(_lowercase						):
                              __UpperCAmelCase			:				Any													=    int(sqrt(_lowercase						)						)
                              __UpperCAmelCase			:				List[Any]													=    int(sqrt(_lowercase						)						)
                              __UpperCAmelCase			:				Any													=    gcd(_lowercase    ,      _lowercase						)
                              z_num //= hcf
                              z_den //= hcf
                              if 0 < z_num < z_den <= order:
                                   __UpperCAmelCase			:				int													=    add_three(
                                       _lowercase    ,      _lowercase    ,      _lowercase    ,      _lowercase    ,      _lowercase    ,      _lowercase						)
                                   unique_s.add(_lowercase						)

     for num, den in unique_s:
          total += Fraction(_lowercase    ,      _lowercase						)

     return total.denominator + total.numerator


if __name__ == "__main__":
      print(f"""{solution() = }""")