'''simple docstring'''




def 							lowerCamelCase			(   UpperCAmelCase__ :      str   ,   UpperCAmelCase__ :      Any				):
							lowercase_      :    str       		= len(lowerCAmelCase__				)
							print("""The following activities are selected:"""				)

							# The first activity is always selected
							lowercase_      :    Optional[int]       		= 0
							print(lowerCAmelCase__   ,   end=""","""				)

							# Consider rest of the activities
							for j in range(lowerCAmelCase__				):
														# If this activity has start time greater than
														# or equal to the finish time of previously
														# selected activity, then select it
														if start[j] >= finish[i]:
																					print(lowerCAmelCase__   ,   end=""","""				)
																					lowercase_      :    Dict       		= j


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						_lowercase		:				str	       =		[1, 3, 0, 5, 8, 5]
						_lowercase		:				Tuple	       =		[2, 4, 6, 7, 9, 9]
						print_max_activities(start, finish)






'''simple docstring'''




_lowercase		:				int	       =		"ABCDEFGHIJKLMNOPQRSTUVWXYZ"




def 							lowerCamelCase			(   )    ->   None:
							lowercase_      :    List[Any]       		= input("""Enter message: """				)
							lowercase_      :    str       		= input("""Enter key [alphanumeric]: """				)
							lowercase_      :    List[Any]       		= input("""Encrypt/Decrypt [e/d]: """				)

							if mode.lower().startswith("""e"""				):
														lowercase_      :    List[str]       		= """encrypt"""
														lowercase_      :    Optional[int]       		= encrypt_message(UpperCAmelCase__   ,   UpperCAmelCase__				)
							elif mode.lower().startswith("""d"""				):
														lowercase_      :    Any       		= """decrypt"""
														lowercase_      :    Optional[Any]       		= decrypt_message(UpperCAmelCase__   ,   UpperCAmelCase__				)

							print(F'''\n{mode.title()}ed message:'''				)
							print(UpperCAmelCase__				)




def 							lowerCamelCase			(   UpperCAmelCase__ :      str   ,   UpperCAmelCase__ :      str				)    ->   str:
							return translate_message(UpperCAmelCase__   ,   UpperCAmelCase__   ,   """encrypt"""				)




def 							lowerCamelCase			(   UpperCAmelCase__ :      str   ,   UpperCAmelCase__ :      str				)    ->   str:
							return translate_message(UpperCAmelCase__   ,   UpperCAmelCase__   ,   """decrypt"""				)




def 							lowerCamelCase			(   UpperCAmelCase__ :      str   ,   UpperCAmelCase__ :      str   ,   UpperCAmelCase__ :      str				)    ->   str:
							lowercase_      :    Union[str, Any]       		= []
							lowercase_      :    List[Any]       		= 0
							lowercase_      :    str       		= key.upper()

							for symbol in message:
														lowercase_      :    Tuple       		= LETTERS.find(symbol.upper()				)
														if num != -1:
																					if mode == "encrypt":
																												num += LETTERS.find(key[key_index]				)
																					elif mode == "decrypt":
																												num -= LETTERS.find(key[key_index]				)

																					num %= len(UpperCAmelCase__				)

																					if symbol.isupper():
																												translated.append(LETTERS[num]				)
																					elif symbol.islower():
																												translated.append(LETTERS[num].lower()				)

																					key_index += 1
																					if key_index == len(UpperCAmelCase__				):
																												lowercase_      :    Any       		= 0
														else:
																					translated.append(UpperCAmelCase__				)
							return "".join(UpperCAmelCase__				)


if __name__ == "__main__":
						main()





