


def 				__lowerCamelCase						( UpperCAmelCase_						:		list[int]						):




      """simple docstring"""





      if not numbers:
            return 0

      if not isinstance(UpperCAmelCase_ ,  (list, tuple)						) or not all(
          isinstance(UpperCAmelCase_ ,  UpperCAmelCase_						) for number in numbers						):
            raise ValueError('''numbers must be an iterable of integers'''						)

      a						:Tuple 							=       numbers[0]

      for i in range(1 ,  len(UpperCAmelCase_						)						):
            # update the maximum and minimum subarray products
            a						:List[str] 							=       numbers[i]
            if number < 0:
                  a							,				a						:Optional[int] 							=       min_till_now, max_till_now
            a						:Any 							=       max(UpperCAmelCase_ ,  max_till_now * number						)
            a						:Any 							=       min(UpperCAmelCase_ ,  min_till_now * number						)

            # update the maximum product found till now
            a						:Optional[int] 							=       max(UpperCAmelCase_ ,  UpperCAmelCase_						)

      return max_prod











def SCREAMING_SNAKE_CASE				(       lowercase_						)   ->       Any:



       """simple docstring"""

       A__       =    [0] * len(lowercase_						)
       A__       =    []
       A__       =    [1] * len(lowercase_						)

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

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

       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(lowercase_						)

       print(max(lowercase_						)						)


# Adjacency list of Graph
_lowerCamelCase	:		Optional[int]							       =   {0: [2, 3, 4], 1: [2, 7], 2: [5], 3: [5, 7], 4: [7], 5: [6], 6: [7], 7: []}
longest_distance(graph)


