





def      _lowercase					(						_UpperCAmelCase				)						->  Any:
				lowerCamelCase	 =[0] * len(__UpperCamelCase				)
				lowerCamelCase	 =[]
				lowerCamelCase	 =[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:
								lowerCamelCase	 =queue.pop(0				)
								for x in graph[vertex]:
												indegree[x] -= 1

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

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

				print(max(__UpperCamelCase				)				)


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




longest_distance(graph)













def      _lowercase					(						_UpperCAmelCase			,      _UpperCAmelCase				)						->  List[str]:
				lowerCamelCase	 =[0 for i in range(r + 1				)]
				# nc0 = 1
				lowerCamelCase	 =1
				for i in range(1			,      n + 1				):
								# to compute current row from previous row.
								lowerCamelCase	 =min(_UpperCAmelCase			,      _UpperCAmelCase				)
								while j > 0:
												c[j] += c[j - 1]
												j -= 1
				return c[r]




print(binomial_coefficient(n=10, r=5))





