


from string import ascii_uppercase
def     UpperCamelCase_(			_A				:str			,       _A				:str			,       _A				:bool = False			,       _A				:str = ascii_uppercase					)->						str:
			UpperCamelCase__   =    keyword.upper()
			UpperCamelCase__   =    plaintext.upper()
			UpperCamelCase__   =    set(_A					)

			# create a list of unique characters in the keyword - their order matters
			# it determines how we will map plaintext characters to the ciphertext
			UpperCamelCase__   =    []
			for char in keyword:
						if char in alphabet_set and char not in unique_chars:
									unique_chars.append(_A					)
    # the number of those unique characters will determine the number of rows
			UpperCamelCase__   =    len(_A					)

			# create a shifted version of the alphabet
			UpperCamelCase__   =    unique_chars + [
			    char for char in alphabet if char not in unique_chars
			]

			# create a modified alphabet by splitting the shifted alphabet into rows
			UpperCamelCase__   =    [
			    shifted_alphabet[k : k + num_unique_chars_in_keyword]
			    for k in range(0			,       26			,       _A					)
			]

			# map the alphabet characters to the modified alphabet characters
			# going 'vertically' through the modified alphabet - consider columns first
			UpperCamelCase__   =    {}
			UpperCamelCase__   =    0
			for column in range(_A					):
						for row in modified_alphabet:
									# if current row (the last one) is too short, break out of loop
									if len(_A					) <= column:
												break

									# map current letter to letter in modified alphabet
									UpperCamelCase__   =    row[column]
									letter_index += 1

			if verbose:
						print(_A					)
			# create the encrypted text by mapping the plaintext to the modified alphabet
			return "".join(mapping[char] if char in mapping else char for char in plaintext					)


if __name__ == "__main__":
						# example use
						print(mixed_keyword('college', 'UNIVERSITY'))






from __future__ import annotations
def     UpperCamelCase_(			_A				:list					)->						int | float:
			UpperCamelCase__   =    sorted(_A					)
			UpperCamelCase__   =    len(_A					)
			UpperCamelCase__   =    length >> 1
			return (
			    (sorted_list[mid_index] + sorted_list[mid_index - 1]) / 2
			    if length % 2 == 0
			    else sorted_list[mid_index]
			)
def     UpperCamelCase_(			)->						List[Any]:
			import doctest

			doctest.testmod()


if __name__ == "__main__":
						main()


