



def   lowerCAmelCase__						(							_SCREAMING_SNAKE_CASE       :			str    ):
				"""simple docstring"""







				__a       =		""""""
				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__						(							_SCREAMING_SNAKE_CASE       :			str    ):
				"""simple docstring"""







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

def   lowerCAmelCase__						(							_SCREAMING_SNAKE_CASE       :			str				,     _SCREAMING_SNAKE_CASE       :			dict[str, str]    ):
				"""simple docstring"""







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

def   lowerCAmelCase__						(							_SCREAMING_SNAKE_CASE       :			str				,     _SCREAMING_SNAKE_CASE       :			dict[str, str]    ):
				"""simple docstring"""







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

def   lowerCAmelCase__						(							):
				"""simple docstring"""







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


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						main()





def   lowerCAmelCase__						(							_SCREAMING_SNAKE_CASE       :			Tuple				,     _SCREAMING_SNAKE_CASE       :			Tuple				,     _SCREAMING_SNAKE_CASE       :			Tuple=False    ):
				"""simple docstring"""







				if isinstance(_SCREAMING_SNAKE_CASE				,     _SCREAMING_SNAKE_CASE    ) and isinstance(_SCREAMING_SNAKE_CASE				,     _SCREAMING_SNAKE_CASE    ):
								__a       =		len(set_a.intersection(_SCREAMING_SNAKE_CASE    )    )

								if alternative_union:
												__a       =		len(_SCREAMING_SNAKE_CASE    ) + len(_SCREAMING_SNAKE_CASE    )
								else:
												__a       =		len(set_a.union(_SCREAMING_SNAKE_CASE    )    )

								return intersection / union

				if isinstance(_SCREAMING_SNAKE_CASE				,     (list, tuple)    ) and isinstance(_SCREAMING_SNAKE_CASE				,     (list, tuple)    ):
								__a       =		[element for element in set_a if element in set_b]

								if alternative_union:
												__a       =		len(_SCREAMING_SNAKE_CASE    ) + len(_SCREAMING_SNAKE_CASE    )
												return len(_SCREAMING_SNAKE_CASE    ) / union
								else:
												__a       =		set_a + [element for element in set_b if element not in set_a]
												return len(_SCREAMING_SNAKE_CASE    ) / len(_SCREAMING_SNAKE_CASE    )

								return len(_SCREAMING_SNAKE_CASE    ) / len(_SCREAMING_SNAKE_CASE    )
				return None


if __name__ == "__main__":
						lowerCamelCase__			= {"""a""", """b""", """c""", """d""", """e"""}
						lowerCamelCase__			= {"""c""", """d""", """e""", """f""", """h""", """i"""}
						print(jaccard_similarity(set_a, set_b))
