



"""simple docstring"""

from __future__ import annotations

import random
import string
class 						lowerCAmelCase__	:


	'''simple docstring'''







	def __init__(			self							:					int    ,					_SCREAMING_SNAKE_CASE							:					str | None = None						)	->  str:





					"""simple docstring"""


					SCREAMING_SNAKE_CASE	:       Optional[int] 							=    passcode or self.__passcode_creator()
					SCREAMING_SNAKE_CASE	:       Dict 							=    self.__make_key_list()
					SCREAMING_SNAKE_CASE	:       Dict 							=    self.__make_shift_key()





	def __str__(			self							:					str						)	->  Union[str, Any]:





					"""simple docstring"""


					return "".join(self.__passcode						)





	def  _lowerCAmelCase    (			self							:					Optional[int]    ,					_SCREAMING_SNAKE_CASE							:					list[int]						)	->  List[str]:





					"""simple docstring"""


					for i in range(1    ,					len(_SCREAMING_SNAKE_CASE						)    ,					2						):
									iterlist[i] *= -1
					return iterlist





	def  _lowerCAmelCase    (			self							:					Optional[int]						)	->  Any:





					"""simple docstring"""


					SCREAMING_SNAKE_CASE	:       Union[str, Any] 							=    string.ascii_letters + string.digits
					SCREAMING_SNAKE_CASE	:       Optional[Any] 							=    [random.choice(_SCREAMING_SNAKE_CASE						) for _ in range(random.randint(10    ,					20						)						)]
					return password





	def  _lowerCAmelCase    (			self							:					Union[str, Any]						)	->  Union[str, Any]:





					"""simple docstring"""


					SCREAMING_SNAKE_CASE	:       Tuple 							=    (
					    string.ascii_letters + string.digits + string.punctuation + " \t\n"
					)

					SCREAMING_SNAKE_CASE	:       Optional[Any] 							=    []

					# creates points known as breakpoints to break the key_list_options at those
					# points and pivot each substring
					SCREAMING_SNAKE_CASE	:       List[Any] 							=    sorted(set(self.__passcode						)						)
					SCREAMING_SNAKE_CASE	:       list[str] 							=    []

					# algorithm for creating a new shuffled list, keys_l, out of key_list_options
					for i in key_list_options:
									temp_list.extend(_SCREAMING_SNAKE_CASE						)

									# checking breakpoints at which to pivot temporary sublist and add it into
									# keys_l
									if i in breakpoints or i == key_list_options[-1]:
													keys_l.extend(temp_list[::-1]						)
													temp_list.clear()

        # returning a shuffled keys_l to prevent brute force guessing of shift key
					return keys_l





	def  _lowerCAmelCase    (			self							:					List[str]						)	->  List[Any]:





					"""simple docstring"""


					SCREAMING_SNAKE_CASE	:       Tuple 							=    sum(self.__neg_pos([ord(_SCREAMING_SNAKE_CASE						) for x in self.__passcode]						)						)
					return num if num > 0 else len(self.__passcode						)





	def  _lowerCAmelCase    (			self							:					Optional[int]    ,					_SCREAMING_SNAKE_CASE							:					str						)	->  int:





					"""simple docstring"""


					SCREAMING_SNAKE_CASE	:       Dict 							=    ""

					# decoding shift like Caesar cipher algorithm implementing negative shift or
					# reverse shift or left shift
					for i in encoded_message:
									SCREAMING_SNAKE_CASE	:       Optional[int] 							=    self.__key_list.index(_SCREAMING_SNAKE_CASE						)
									decoded_message += self.__key_list[
									    (position - self.__shift_key) % -len(self.__key_list						)
									]

					return decoded_message







	def  _lowerCAmelCase    (			self							:					List[str]    ,					_SCREAMING_SNAKE_CASE							:					str						)	->  Tuple:





					"""simple docstring"""


					SCREAMING_SNAKE_CASE	:       Tuple 							=    ""

					# encoding shift like Caesar cipher algorithm implementing positive shift or
					# forward shift or right shift
					for i in plaintext:
									SCREAMING_SNAKE_CASE	:       Optional[int] 							=    self.__key_list.index(_SCREAMING_SNAKE_CASE						)
									encoded_message += self.__key_list[
									    (position + self.__shift_key) % len(self.__key_list						)
									]

					return encoded_message




def    __snake_case       (  __A			:	str = "Hello, this is a modified Caesar cipher"    )    ->					str:






				'''simple docstring'''
				SCREAMING_SNAKE_CASE	:       List[Any] 							=    ShuffledShiftCipher()
				return cipa.decrypt(cipa.encrypt(__lowerCAmelCase    )    )


if __name__ == "__main__":
							import doctest

							doctest.testmod()










"""simple docstring"""

def    __snake_case       (  __A			:	int = 100    )    ->					int:






				'''simple docstring'''
				SCREAMING_SNAKE_CASE	:       Any 							=    1
				SCREAMING_SNAKE_CASE	:       Optional[int] 							=    0
				for i in range(1       ,		num + 1    ):
								fact *= i

				for j in str(__A    ):
								result += int(__A    )

				return result


if __name__ == "__main__":
							print(solution(int(input('Enter the Number: ').strip())))





