


'''simple docstring'''





def     UpperCamelCase    (      _a		)					->							str:
     '''simple docstring'''





     lowercase_       :Dict     =       ''''''
     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     UpperCamelCase    (      _a		)					->							dict[str, str]:
     '''simple docstring'''





     lowercase_       :Union[str, Any]     =       [chr(i + 6_5		) for i in range(2_6		)]
     # Remove duplicate characters from key
     lowercase_       :Union[str, Any]     =       remove_duplicates(key.upper()		)
     lowercase_       :Any     =       len(_a		)
     # First fill cipher with key characters
     lowercase_       :List[Any]     =       {alphabet[i]: char for i, char in enumerate(_a		)}
     # Then map remaining characters in alphabet to
     # the alphabet from the beginning
     for i in range(len(_a		)       ,		2_6		):
          lowercase_       :str     =       alphabet[i - offset]
          # Ensure we are not mapping letters to letters previously mapped
          while char in key:
               offset -= 1
               lowercase_       :Union[str, Any]     =       alphabet[i - offset]
          lowercase_       :str     =       char
     return cipher_alphabet




def     UpperCamelCase    (      _a       ,		_a		)					->							str:
     '''simple docstring'''





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




def     UpperCamelCase    (      _a       ,		_a		)					->							str:
     '''simple docstring'''





     lowercase_       :Optional[Any]     =       {v: k for k, v in cipher_map.items()}
     return "".join(rev_cipher_map.get(_a       ,		_a		) for ch in message.upper()		)




def     UpperCamelCase    (      )					->							None:
     '''simple docstring'''





     lowercase_       :Any     =       input('''Enter message to encode or decode: '''		).strip()
     lowercase_       :List[Any]     =       input('''Enter keyword: '''		).strip()
     lowercase_       :Optional[Any]     =       input('''Encipher or decipher? E/D:'''		).strip()[0].lower()
     try:
          lowercase_       :List[str]     =       {'''e''': encipher, '''d''': decipher}[option]
     except KeyError:
          raise KeyError('''invalid input option'''		)
     lowercase_       :Optional[int]     =       create_cipher_map(_a		)
     print(func(_a       ,		_a		)		)


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   main()





import math

SCREAMING_SNAKE_CASE       :		List[str]         =				10
SCREAMING_SNAKE_CASE       :		Dict         =				7
SCREAMING_SNAKE_CASE       :		int         =				BALLS_PER_COLOUR * NUM_COLOURS




def     UpperCamelCase    (      _a = 2_0		)					->							str:
     '''simple docstring'''





     lowercase_       :List[str]     =       math.comb(_a       ,		_a		)
     lowercase_       :Tuple     =       math.comb(NUM_BALLS - BALLS_PER_COLOUR       ,		_a		)

     lowercase_       :Dict     =       NUM_COLOURS * (1 - missing_colour / total)

     return f"{result:.9f}"


if __name__ == "__main__":
   print(solution(20))

