




"""simple docstring"""




lowerCAmelCase							:			Optional[int]     							=							{0: [2, 3], 1: [0], 2: [1], 3: [4], 4: []}

lowerCAmelCase							:			List[Any]     							=							{0: [1, 2, 3], 1: [2], 2: [0], 3: [4], 4: [5], 5: [3]}



def     a__ (				snake_case__       , snake_case__       , snake_case__				)						->					list[int]:
			lowerCamelCase			      =					True
			lowerCamelCase			      =					[]

			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     a__ (				snake_case__       , snake_case__       , snake_case__				)						->					list[int]:
			lowerCamelCase			      =					True
			lowerCamelCase			      =					[vert]

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

			return component



def     a__ (				snake_case__				)						->					list[list[int]]:
			lowerCamelCase			      =					len(snake_case__				) * [False]
			lowerCamelCase			      =					{vert: [] for vert in range(len(snake_case__				)				)}

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

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

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

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

			return components_list









"""simple docstring"""




from __future__ import annotations



def     a__ (				snake_case__       , snake_case__				)						->					bool:
			if len(snake_case__				) == 0:
						return False
			lowerCamelCase			      =					len(snake_case__				) // 2
			if a_list[midpoint] == item:
						return True
			if item < a_list[midpoint]:
						return binary_search(a_list[:midpoint]       , snake_case__				)
			else:
						return binary_search(a_list[midpoint + 1 :]       , snake_case__				)


if __name__ == "__main__":
					lowerCAmelCase							:			List[Any]     							=							input("""Enter numbers separated by comma:\n""").strip()
					lowerCAmelCase							:			Optional[Any]     							=							[int(item.strip()) for item in user_input.split(""",""")]
					lowerCAmelCase							:			Optional[int]     							=							int(input("""Enter the number to be found in the list:\n""").strip())
					lowerCAmelCase							:			Union[str, Any]     							=							"""""" if binary_search(sequence, target) else """not """
					print(F"""{target} was {not_str}found in {sequence}""")



