


'''simple docstring'''



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

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







def     _UpperCamelCase      (		UpperCamelCase__ ,      UpperCamelCase__ ,      UpperCamelCase__					):
			UpperCAmelCase__  :					Any        =     True
			UpperCAmelCase__  :					Optional[int]        =     []

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

			order.append(SCREAMING_SNAKE_CASE_					)

			return order







def     _UpperCamelCase      (		UpperCamelCase__ ,      UpperCamelCase__ ,      UpperCamelCase__					):
			UpperCAmelCase__  :					int        =     True
			UpperCAmelCase__  :					List[Any]        =     [vert]

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

			return component







def     _UpperCamelCase      (		UpperCamelCase__					):
			UpperCAmelCase__  :					List[str]        =     len(SCREAMING_SNAKE_CASE_					) * [False]
			UpperCAmelCase__  :					dict[int, list[int]]        =     {vert: [] for vert in range(len(SCREAMING_SNAKE_CASE_					)					)}

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

			UpperCAmelCase__  :					List[str]        =     []
			for i, was_visited in enumerate(SCREAMING_SNAKE_CASE_					):
						if not was_visited:
									order += topology_sort(SCREAMING_SNAKE_CASE_ ,      SCREAMING_SNAKE_CASE_ ,      SCREAMING_SNAKE_CASE_					)

			UpperCAmelCase__  :					int        =     []
			UpperCAmelCase__  :					Optional[Any]        =     len(SCREAMING_SNAKE_CASE_					) * [False]

			for i in range(len(SCREAMING_SNAKE_CASE_					)					):
						UpperCAmelCase__  :					Dict        =     order[len(SCREAMING_SNAKE_CASE_					) - i - 1]
						if not visited[vert]:
									UpperCAmelCase__  :					Union[str, Any]        =     find_components(SCREAMING_SNAKE_CASE_ ,      SCREAMING_SNAKE_CASE_ ,      SCREAMING_SNAKE_CASE_					)
									components_list.append(SCREAMING_SNAKE_CASE_					)

			return components_list



'''simple docstring'''



import warnings
from functools import wraps
from typing import Callable







def     _UpperCamelCase      (		UpperCamelCase__					):

			@wraps(UpperCamelCase__					)
			def _inner_fn(*UpperCamelCase__ ,      **UpperCamelCase__					):
						warnings.warn(
						    (f'''\'{fn.__name__}\' is experimental and might be subject to breaking changes in the future.''') ,      UpperCamelCase__ ,      )
						return fn(*UpperCamelCase__ ,      **UpperCamelCase__					)

			return _inner_fn