






from string import ascii_uppercase

UpperCamelCase			    =     {char: i for i, char in enumerate(ascii_uppercase)}
UpperCamelCase			    =     dict(enumerate(ascii_uppercase))

def 	__lowerCamelCase      (		snake_case__	,snake_case__		)							->  str:






						"""simple docstring"""





						_SCREAMING_SNAKE_CASE     				=  len(snake_case__		)
						_SCREAMING_SNAKE_CASE     				=  0
						while True:
												if x == i:
																		_SCREAMING_SNAKE_CASE     				=  0
												if len(snake_case__		) == len(snake_case__		):
																		break
												key += key[i]
												i += 1
						return key

def 	__lowerCamelCase      (		snake_case__	,snake_case__		)							->  str:






						"""simple docstring"""





						_SCREAMING_SNAKE_CASE     				=  """"""
						_SCREAMING_SNAKE_CASE     				=  0
						for letter in message:
												if letter == " ":
																		cipher_text += " "
												else:
																		_SCREAMING_SNAKE_CASE     				=  (dicta[letter] - dicta[key_new[i]]) % 26
																		i += 1
																		cipher_text += dicta[x]
						return cipher_text

def 	__lowerCamelCase      (		snake_case__	,snake_case__		)							->  str:






						"""simple docstring"""





						_SCREAMING_SNAKE_CASE     				=  """"""
						_SCREAMING_SNAKE_CASE     				=  0
						for letter in cipher_text:
												if letter == " ":
																		or_txt += " "
												else:
																		_SCREAMING_SNAKE_CASE     				=  (dicta[letter] + dicta[key_new[i]] + 26) % 26
																		i += 1
																		or_txt += dicta[x]
						return or_txt

def 	__lowerCamelCase      (		)							->  None:






						"""simple docstring"""





						_SCREAMING_SNAKE_CASE     				=  """THE GERMAN ATTACK"""
						_SCREAMING_SNAKE_CASE     				=  """SECRET"""
						_SCREAMING_SNAKE_CASE     				=  generate_key(snake_case__	,snake_case__		)
						_SCREAMING_SNAKE_CASE     				=  cipher_text(snake_case__	,snake_case__		)
						print(F'Encrypted Text = {s}'		)
						print(F'Original Text = {original_text(snake_case__	,snake_case__		)}'		)


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		main()









UpperCamelCase			    =     {0: [2, 3], 1: [0], 2: [1], 3: [4], 4: []}

UpperCamelCase			    =     {0: [1, 2, 3], 1: [2], 2: [0], 3: [4], 4: [5], 5: [3]}

def 	__lowerCamelCase      (		snake_case__	,snake_case__	,snake_case__		)							->  list[int]:






						"""simple docstring"""





						_SCREAMING_SNAKE_CASE     				=  True
						_SCREAMING_SNAKE_CASE     				=  []

						for neighbour in graph[vert]:
												if not visited[neighbour]:
																		order += topology_sort(snake_case__	,snake_case__	,snake_case__		)

						order.append(snake_case__		)

						return order

def 	__lowerCamelCase      (		snake_case__	,snake_case__	,snake_case__		)							->  list[int]:






						"""simple docstring"""





						_SCREAMING_SNAKE_CASE     				=  True
						_SCREAMING_SNAKE_CASE     				=  [vert]

						for neighbour in reversed_graph[vert]:
												if not visited[neighbour]:
																		component += find_components(snake_case__	,snake_case__	,snake_case__		)

						return component




def 	__lowerCamelCase      (		snake_case__		)							->  list[list[int]]:






						"""simple docstring"""





						_SCREAMING_SNAKE_CASE     				=  len(snake_case__		) * [False]
						_SCREAMING_SNAKE_CASE     				=  {vert: [] for vert in range(len(snake_case__		)		)}

						for vert, neighbours in graph.items():
												for neighbour in neighbours:
																		reversed_graph[neighbour].append(snake_case__		)

						_SCREAMING_SNAKE_CASE     				=  []
						for i, was_visited in enumerate(snake_case__		):
												if not was_visited:
																		order += topology_sort(snake_case__	,snake_case__	,snake_case__		)

						_SCREAMING_SNAKE_CASE     				=  []
						_SCREAMING_SNAKE_CASE     				=  len(snake_case__		) * [False]

						for i in range(len(snake_case__		)		):
												_SCREAMING_SNAKE_CASE     				=  order[len(snake_case__		) - i - 1]
												if not visited[vert]:
																		_SCREAMING_SNAKE_CASE     				=  find_components(snake_case__	,snake_case__	,snake_case__		)
																		components_list.append(snake_case__		)

						return components_list

