





"""simple docstring"""
def 					A__				(			UpperCamelCase       ):
							A		=  [0] * len(UpperCamelCase       )
							A		=  []
							A		=  [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:
														A		=  queue.pop(0       )
														for x in graph[vertex]:
																					indegree[x] -= 1

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

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

							print(max(UpperCamelCase       )       )


# Adjacency list of Graph
_snake_case     :		List[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       A       (					lowercase )   ->  str:
		'''simple docstring'''

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

		UpperCamelCase		=     precision
		UpperCamelCase		=     ceil(precision / 14 )
		UpperCamelCase		=     426_880 * Decimal(10_005 ).sqrt()
		UpperCamelCase		=     1
		UpperCamelCase		=     13_591_409
		UpperCamelCase		=     Decimal(lowercase )
		for k in range(1    ,       lowercase ):
				UpperCamelCase		=     factorial(6 * k ) // (factorial(3 * k ) * factorial(lowercase ) ** 3)
				linear_term += 545_140_134
				exponential_term *= -262_537_412_640_768_000
				partial_sum += Decimal(multinomial_term * linear_term ) / exponential_term
		return str(constant_term / partial_sum )[:-1]


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