






def    UpperCamelCase						(	_A			):






						"""simple docstring"""







						__magic_name__      :       Union[str, Any]       						= [0] * len(__lowerCAmelCase			)
						__magic_name__      :       List[Any]       						= []
						__magic_name__      :       Dict       						= [1] * len(__lowerCAmelCase			)

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

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

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

																		if long_dist[vertex] + 1 > long_dist[x]:
																								__magic_name__      :       List[str]       						= long_dist[vertex] + 1

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

						print(max(__lowerCAmelCase			)			)


# Adjacency list of Graph
__magic_name__:					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)








from decimal import Decimal, getcontext
from math import ceil, factorial

def    UpperCamelCase						(	_A			):






						"""simple docstring"""







						if not isinstance(_A,   _A			):
												raise TypeError("""Undefined for non-integers"""			)
						elif precision < 1:
												raise ValueError("""Undefined for non-natural numbers"""			)

						__magic_name__      :       Dict       						= precision
						__magic_name__      :       str       						= ceil(precision / 14			)
						__magic_name__      :       List[str]       						= 426880 * Decimal(10005			).sqrt()
						__magic_name__      :       List[Any]       						= 1
						__magic_name__      :       Dict       						= 13591409
						__magic_name__      :       Tuple       						= Decimal(_A			)
						for k in range(1,   _A			):
												__magic_name__      :       List[Any]       						= factorial(6 * k			) // (factorial(3 * k			) * factorial(_A			) ** 3)
												linear_term += 545140134
												exponential_term *= -262537412640768000
												partial_sum += Decimal(multinomial_term * linear_term			) / exponential_term
						return str(constant_term / partial_sum			)[:-1]


if __name__ == "__main__":
		__magic_name__:					Tuple							=     50
		print(F"""The first {n} digits of pi is: {pi(n)}""")
