






def  _lowerCamelCase						(						__lowerCamelCase       ) ->			Any:

     '''simple docstring'''
     UpperCAmelCase__      :  List[Any]				      =			[0] * len(_lowerCamelCase       )
     UpperCAmelCase__      :  List[Any]				      =			[]
     UpperCAmelCase__      :  List[Any]				      =			[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:
          UpperCAmelCase__      :  Dict				      =			queue.pop(0       )
          for x in graph[vertex]:
               indegree[x] -= 1

               if long_dist[vertex] + 1 > long_dist[x]:
                    UpperCAmelCase__      :  int				      =			long_dist[vertex] + 1

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

     print(max(_lowerCamelCase       )       )


# Adjacency list of Graph
SCREAMING_SNAKE_CASE__		:							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'''






def 					_a						(       _lowerCamelCase = 100 ) ->				int:



			"""simple docstring"""


			__snake_case					:      Any							      =     n * (n + 1) * (2 * n + 1) / 6
			__snake_case					:      List[Any]							      =     (n * (n + 1) / 2) ** 2
			return int(square_of_sum - sum_of_squares )


if __name__ == "__main__":
	print(f"""{solution() = }""")


