




def 				_A  (		lowerCAmelCase_	:   Optional[Any]     ):
     """simple docstring"""

     lowerCAmelCase__            =					[0] * len(lowerCAmelCase_     )
     lowerCAmelCase__            =					[]
     lowerCAmelCase__            =					[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:
          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(lowerCAmelCase_     )

     print(max(lowerCAmelCase_     )     )


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






longest_distance(graph)





def 	SCREAMING_SNAKE_CASE_							(	_snake_case	:int				)  ->     int:
   if not isinstance(_snake_case	,   _snake_case				):
      raise ValueError('''Input must be an integer'''				)
   if input_num <= 0:
      raise ValueError('''Input must be positive'''				)
   return sum(
       divisor for divisor in range(1	,   input_num // 2 + 1				) if input_num % divisor == 0				)


if __name__ == "__main__":
   import doctest

   doctest.testmod()



