




'''simple docstring'''

def 		__magic_name__    (	__UpperCAmelCase	)		->					Any:

					'''simple docstring'''

					snake_case_									=				[0] * len(__UpperCAmelCase	)
					snake_case_									=				[]
					snake_case_									=				[1] * len(__UpperCAmelCase	)

					for values in graph.values():
										for i in values:
															indegree[i] += 1

					for i in range(len(__UpperCAmelCase	)	):
										if indegree[i] == 0:
															queue.append(__UpperCAmelCase	)

					while queue:
										snake_case_									=				queue.pop(0	)
										for x in graph[vertex]:
															indegree[x] -= 1

															if long_dist[vertex] + 1 > long_dist[x]:
																				snake_case_									=				long_dist[vertex] + 1

															if indegree[x] == 0:
																				queue.append(__UpperCAmelCase	)

					print(max(__UpperCAmelCase	)	)


# Adjacency list of Graph
a  :				Union[str, Any]									=  {0: [2, 3, 4], 1: [2, 7], 2: [5], 3: [5, 7], 4: [7], 5: [6], 6: [7], 7: []}

longest_distance(graph)







'''simple docstring'''

import math
from collections.abc import Callable


def 		__magic_name__    (	__UpperCAmelCase,      __UpperCAmelCase,      __UpperCAmelCase	)		->					float:

					'''simple docstring'''

					snake_case_									=				xa
					snake_case_									=				xa
					while True:
										if x_n == x_na or function(__UpperCAmelCase	) == function(__UpperCAmelCase	):
															raise ZeroDivisionError('''float division by zero, could not find root'''	)
										snake_case_									=				x_na - (
										    function(__UpperCAmelCase	) / ((function(__UpperCAmelCase	) - function(__UpperCAmelCase	)) / (x_na - x_n))
										)
										if abs(x_na - x_na	) < 10**-5:
															return x_na
										snake_case_									=				x_na
										snake_case_									=				x_na


def 		__magic_name__    (	__UpperCAmelCase	)		->					float:

					'''simple docstring'''

					return math.pow(__UpperCAmelCase,      3	) - (2 * x) - 5


if __name__ == "__main__":
							print(intersection(f, 3, 3.5))

