


"""simple docstring"""


def _lowerCamelCase	(		_UpperCamelCase      ):

			'''simple docstring'''




			__lowerCAmelCase				    =			""
			for ch in key:
						if ch == " " or ch not in key_no_dups and ch.isalpha():
									key_no_dups += ch
			return key_no_dups


def _lowerCamelCase	(		_UpperCamelCase      ):

			'''simple docstring'''




			__lowerCAmelCase				    =			[chr(i + 65      ) for i in range(26      )]
			# Remove duplicate characters from key
			__lowerCAmelCase				    =			remove_duplicates(key.upper()      )
			__lowerCAmelCase				    =			len(_UpperCamelCase      )
			# First fill cipher with key characters
			__lowerCAmelCase				    =			{alphabet[i]: char for i, char in enumerate(_UpperCamelCase      )}
			# Then map remaining characters in alphabet to
			# the alphabet from the beginning
			for i in range(len(_UpperCamelCase      )    , 26      ):
						__lowerCAmelCase				    =			alphabet[i - offset]
						# Ensure we are not mapping letters to letters previously mapped
						while char in key:
									offset -= 1
									__lowerCAmelCase				    =			alphabet[i - offset]
						__lowerCAmelCase				    =			char
			return cipher_alphabet


def _lowerCamelCase	(		_UpperCamelCase    , _UpperCamelCase      ):

			'''simple docstring'''




			return "".join(cipher_map.get(_UpperCamelCase    , _UpperCamelCase      ) for ch in message.upper()      )


def _lowerCamelCase	(		_UpperCamelCase    , _UpperCamelCase      ):

			'''simple docstring'''




			__lowerCAmelCase				    =			{v: k for k, v in cipher_map.items()}
			return "".join(rev_cipher_map.get(_UpperCamelCase    , _UpperCamelCase      ) for ch in message.upper()      )


def _lowerCamelCase	(		):

			'''simple docstring'''




			__lowerCAmelCase				    =			input("Enter message to encode or decode: "      ).strip()
			__lowerCAmelCase				    =			input("Enter keyword: "      ).strip()
			__lowerCAmelCase				    =			input("Encipher or decipher? E/D:"      ).strip()[0].lower()
			try:
						__lowerCAmelCase				    =			{"e": encipher, "d": decipher}[option]
			except KeyError:
						raise KeyError("invalid input option"      )
			__lowerCAmelCase				    =			create_cipher_map(_UpperCamelCase      )
			print(func(_UpperCamelCase    , _UpperCamelCase      )      )


if __name__ == "__main__":
	import doctest

	doctest.testmod()
	main()








"""simple docstring"""


def _lowerCamelCase	(		_UpperCamelCase = 6008_5147_5143      ):

			'''simple docstring'''




			try:
						__lowerCAmelCase				    =			int(_UpperCamelCase      )
			except (TypeError, ValueError):
						raise TypeError("Parameter n must be int or castable to int."      )
			if n <= 0:
						raise ValueError("Parameter n must be greater than or equal to one."      )
			__lowerCAmelCase				    =			2
			__lowerCAmelCase				    =			0
			if n == 2:
						return 2
			while n > 2:
						while n % i != 0:
									i += 1
						__lowerCAmelCase				    =			i
						while n % i == 0:
									__lowerCAmelCase				    =			n // i
						i += 1
			return int(_UpperCamelCase      )


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




