






def        _a  (     UpperCamelCase_					:				str   ) ->   str:
						"""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        _a  (     UpperCamelCase_					:				str   ) ->   dict[str, str]:
						"""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        _a  (     UpperCamelCase_					:				str    ,   UpperCamelCase_					:				dict[str, str]   ) ->   str:
						"""simple docstring"""







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


def        _a  (     UpperCamelCase_					:				str    ,   UpperCamelCase_					:				dict[str, str]   ) ->   str:
						"""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        _a  (     ) ->   None:
						"""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()














# this script reports modified .py files under the desired list of top-level sub-dirs passed as a list of arguments, e.g.:
#   python ./utils/get_modified_files.py utils src tests examples
#
# it uses git to find the forking point and which files were modified - i.e. files not under git won't be considered
# since the output of this script is fed into Makefile commands it doesn't print a newline after the results

import re
import subprocess
import sys


a_							=    subprocess.check_output('''git merge-base main HEAD'''.split()).decode('''utf-8''')
a_							=    subprocess.check_output(F"git diff --name-only {fork_point_sha}".split()).decode('''utf-8''').split()

a_							=    '''|'''.join(sys.argv[1:])
a_							=    re.compile(rF"^({joined_dirs}).*?\.py$")

a_							=    [x for x in modified_files if regex.match(x)]
print(''' '''.join(relevant_modified_files), end='''''')






