




from __future__ import annotations

from string import ascii_letters






def    snake_case   (				A		,  A		,  A = None     )				->				str:




	'''simple docstring'''


	lowerCamelCase_				:						Tuple				  =				alphabet or ascii_letters

	# The final result string
	lowerCamelCase_				:						int				  =				''

	for character in input_string:
		if character not in alpha:
			# Append without encryption if character is not in the alphabet
			result += character
		else:
			# Get the index of the new key and make sure it isn't too large
			lowerCamelCase_				:						List[str]				  =				(alpha.index(A     ) + key) % len(A     )

			# Append the encoded character to the alphabet
			result += alpha[new_key]

	return result






def    snake_case   (				A		,  A		,  A = None     )				->				str:




	'''simple docstring'''


	key *= -1

	return encrypt(A		,  A		,  A     )






def    snake_case   (				A		,  A = None     )				->				dict[int, str]:




	'''simple docstring'''


	lowerCamelCase_				:						Optional[Any]				  =				alphabet or ascii_letters

	# To store data on all the combinations
	lowerCamelCase_				:						Any				  =				{}

	# Cycle through each combination
	for key in range(1		,  len(A     ) + 1     ):
		# Decrypt the message and store the result in the data
		lowerCamelCase_				:						Union[str, Any]				  =				decrypt(A		,  A		,  A     )

	return brute_force_data


if __name__ == "__main__":
							while True:
														print(F'\n{"-" * 1_0}\n Menu\n{"-" * 1_0}')
														print(*['1.Encrypt', '2.Decrypt', '3.BruteForce', '4.Quit'], sep='\n')

														# get user input
														UpperCamelCase__						=		input('\nWhat would you like to do?: ').strip() or '4'

														# run functions based on what the user chose
														if choice not in ("1", "2", "3", "4"):
																					print('Invalid choice, please enter a valid choice')
														elif choice == "1":
																					UpperCamelCase__						=		input('Please enter the string to be encrypted: ')
																					UpperCamelCase__						=		int(input('Please enter off-set: ').strip())

																					print(encrypt(input_string, key))
														elif choice == "2":
																					UpperCamelCase__						=		input('Please enter the string to be decrypted: ')
																					UpperCamelCase__						=		int(input('Please enter off-set: ').strip())

																					print(decrypt(input_string, key))
														elif choice == "3":
																					UpperCamelCase__						=		input('Please enter the string to be decrypted: ')
																					UpperCamelCase__						=		brute_force(input_string)

																					for key, value in brute_force_data.items():
																												print(F'Key: {key} | Message: {value}')

														elif choice == "4":
																					print('Goodbye.')
																					break






UpperCamelCase__						=		[
    [0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0],
    [0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
    [0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0],
    [0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0],
    [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0],
]






def    snake_case   (				A		,  A		,  A		,  A     )				->				bool:




	'''simple docstring'''


	return 0 <= row < rows and 0 <= col < cols






def    snake_case   (				A		,  A		,  A		,  A     )				->				int:




	'''simple docstring'''


	lowerCamelCase_				:						List[str]				  =				len(A     )
	lowerCamelCase_				:						Any				  =				len(mat[0]     )
	if is_safe(A		,  A		,  A		,  A     ) and (row, col) not in seen and mat[row][col] == 1:
		seen.add((row, col)     )
		return (
		    1
		    + depth_first_search(row + 1		,  A		,  A		,  A     )
		    + depth_first_search(row - 1		,  A		,  A		,  A     )
		    + depth_first_search(A		,  col + 1		,  A		,  A     )
		    + depth_first_search(A		,  col - 1		,  A		,  A     )
		)
	else:
		return 0






def    snake_case   (				A     )				->				int:




	'''simple docstring'''


	lowerCamelCase_				:						set				  =				set()

	lowerCamelCase_				:						Optional[Any]				  =				0
	for row, line in enumerate(A     ):
		for col, item in enumerate(A     ):
			if item == 1 and (row, col) not in seen:
				# Maximizing the area
				lowerCamelCase_				:						Optional[Any]				  =				max(A		,  depth_first_search(A		,  A		,  A		,  A     )     )
	return max_area


if __name__ == "__main__":
							import doctest

							print(find_max_area(matrix))  # Output -> 6
							doctest.testmod()
