





'''simple docstring'''


lowerCAmelCase :					Optional[Any] 							=9.8_0665
def 							UpperCAmelCase_  (						__lowerCamelCase : float     ,__lowerCamelCase : float     ,__lowerCamelCase : float = g			):

   if fluid_density <= 0:
      raise ValueError("Impossible fluid density"			)
   if volume < 0:
      raise ValueError("Impossible Object volume"			)
   if gravity <= 0:
      raise ValueError("Impossible Gravity"			)

   return fluid_density * gravity * volume


if __name__ == "__main__":
 import doctest

 # run doctest
 doctest.testmod()









'''simple docstring'''


def 							UpperCAmelCase_  (						__lowerCamelCase : dict			):
   lowercase_      :set[int]         =			set()
   # To detect a back edge, keep track of vertices currently in the recursion stack
   lowercase_      :set[int]         =			set()
   return any(
       node not in visited and depth_first_search(__lowerCamelCase     ,__lowerCamelCase     ,__lowerCamelCase     ,__lowerCamelCase			)
       for node in graph			)
def 							UpperCAmelCase_  (						__lowerCamelCase : dict     ,__lowerCamelCase : int     ,__lowerCamelCase : set     ,__lowerCamelCase : set			):
   visited.add(__lowerCamelCase			)
   rec_stk.add(__lowerCamelCase			)

   for node in graph[vertex]:
      if node not in visited:
         if depth_first_search(__lowerCamelCase     ,__lowerCamelCase     ,__lowerCamelCase     ,__lowerCamelCase			):
            return True
      elif node in rec_stk:
         return True

    # The node needs to be removed from recursion stack before function ends
   rec_stk.remove(__lowerCamelCase			)
   return False


if __name__ == "__main__":
 from doctest import testmod

 testmod()


