code: 
  
  
  
  
  
  '''simple docstring'''
  
  lowercase_			       =				float("""inf""")
  
  
  class       a_  :
  
      '''simple docstring'''
  
  
      def __init__(	self				,	A )	->     Optional[Any]:
          _SCREAMING_SNAKE_CASE             =    [0] * n
          _SCREAMING_SNAKE_CASE             =    [0] * n
          _SCREAMING_SNAKE_CASE             =    [0] * n
          _SCREAMING_SNAKE_CASE             =    [[] for _ in range(A )]
  
  
      def     snake_case_(	self				,	A				,	A				,	A				,	A=0 )	->     Optional[int]:
          self.adj[a].append([b, len(self.adj[b] ), c, 0] )
          self.adj[b].append([a, len(self.adj[a] ) - 1, rcap, 0] )
  
  
      def     snake_case_(	self				,	A				,	A				,	A )	->     Optional[Any]:
          if vertex == sink or not flow:
              return flow
  
          for i in range(self.ptr[vertex]				,	len(self.adj[vertex] ) ):
              _SCREAMING_SNAKE_CASE             =    self.adj[vertex][i]
              if self.lvl[e[0]] == self.lvl[vertex] + 1:
                  _SCREAMING_SNAKE_CASE             =    self.depth_first_search(e[0]				,	A				,	min(A				,	e[2] - e[3] ) )
                  if p:
                      self.adj[vertex][i][3] += p
                      self.adj[e[0]][e[1]][3] -= p
                      return p
              _SCREAMING_SNAKE_CASE             =    self.ptr[vertex] + 1
          return 0
  
  
  
  
  
      def     snake_case_(	self				,	A				,	A )	->     List[str]:
          _SCREAMING_SNAKE_CASE       , _SCREAMING_SNAKE_CASE             =    0, source
          for l in range(31 ):  # noqa: E741  l = 30 maybe faster for random data
              while True:
                  _SCREAMING_SNAKE_CASE       , _SCREAMING_SNAKE_CASE             =    [0] * len(self.q ), [0] * len(self.q )
                  _SCREAMING_SNAKE_CASE       , _SCREAMING_SNAKE_CASE       , _SCREAMING_SNAKE_CASE             =    0, 1, 1
                  while qi < qe and not self.lvl[sink]:
                      _SCREAMING_SNAKE_CASE             =    self.q[qi]
                      qi += 1
                      for e in self.adj[v]:
                          if not self.lvl[e[0]] and (e[2] - e[3]) >> (30 - l):
                              _SCREAMING_SNAKE_CASE             =    e[0]
                              qe += 1
                              _SCREAMING_SNAKE_CASE             =    self.lvl[v] + 1
  
                  _SCREAMING_SNAKE_CASE             =    self.depth_first_search(A				,	A				,	A )
                  while p:
                      flow += p
                      _SCREAMING_SNAKE_CASE             =    self.depth_first_search(A				,	A				,	A )
  
                  if not self.lvl[sink]:
                      break
  
          return flow
  lowercase_			       =				Dinic(10)
  lowercase_			       =				0
  lowercase_			       =				9
  for vertex in range(1, 5):
        graph.add_edge(source, vertex, 1)
  for vertex in range(5, 9):
        graph.add_edge(vertex, sink, 1)
  for vertex in range(1, 5):
        graph.add_edge(vertex, vertex + 4, 1)
  
  # Now we can know that is the maximum flow(source -> sink)
  print(graph.max_flow(source, sink))
  
  
  
  
style_context: 
  
  
  
  
  
  '''simple docstring'''
  
  def lowerCamelCase		(  __lowerCamelCase				:					float      , __lowerCamelCase				:					float      , __lowerCamelCase				:					float					)		->list[int]:
      if hue < 0 or hue > 360:
          raise Exception("""hue should be between 0 and 360"""					)
  
      if saturation < 0 or saturation > 1:
          raise Exception("""saturation should be between 0 and 1"""					)
  
      if value < 0 or value > 1:
          raise Exception("""value should be between 0 and 1"""					)
  
      _SCREAMING_SNAKE_CASE             =    value * saturation
      _SCREAMING_SNAKE_CASE             =    hue / 60
      _SCREAMING_SNAKE_CASE             =    chroma * (1 - abs(hue_section % 2 - 1					))
      _SCREAMING_SNAKE_CASE             =    value - chroma
  
      if hue_section >= 0 and hue_section <= 1:
          _SCREAMING_SNAKE_CASE             =    round(255 * (chroma + match_value)					)
          _SCREAMING_SNAKE_CASE             =    round(255 * (second_largest_component + match_value)					)
          _SCREAMING_SNAKE_CASE             =    round(255 * (match_value)					)
      elif hue_section > 1 and hue_section <= 2:
          _SCREAMING_SNAKE_CASE             =    round(255 * (second_largest_component + match_value)					)
          _SCREAMING_SNAKE_CASE             =    round(255 * (chroma + match_value)					)
          _SCREAMING_SNAKE_CASE             =    round(255 * (match_value)					)
      elif hue_section > 2 and hue_section <= 3:
          _SCREAMING_SNAKE_CASE             =    round(255 * (match_value)					)
          _SCREAMING_SNAKE_CASE             =    round(255 * (chroma + match_value)					)
          _SCREAMING_SNAKE_CASE             =    round(255 * (second_largest_component + match_value)					)
      elif hue_section > 3 and hue_section <= 4:
          _SCREAMING_SNAKE_CASE             =    round(255 * (match_value)					)
          _SCREAMING_SNAKE_CASE             =    round(255 * (second_largest_component + match_value)					)
          _SCREAMING_SNAKE_CASE             =    round(255 * (chroma + match_value)					)
      elif hue_section > 4 and hue_section <= 5:
          _SCREAMING_SNAKE_CASE             =    round(255 * (second_largest_component + match_value)					)
          _SCREAMING_SNAKE_CASE             =    round(255 * (match_value)					)
          _SCREAMING_SNAKE_CASE             =    round(255 * (chroma + match_value)					)
      else:
          _SCREAMING_SNAKE_CASE             =    round(255 * (chroma + match_value)					)
          _SCREAMING_SNAKE_CASE             =    round(255 * (match_value)					)
          _SCREAMING_SNAKE_CASE             =    round(255 * (second_largest_component + match_value)					)
  
      return [red, green, blue]
  
  
  
  
  
  def lowerCamelCase		(  __lowerCamelCase				:					int      , __lowerCamelCase				:					int      , __lowerCamelCase				:					int					)		->list[float]:
      if red < 0 or red > 255:
          raise Exception("""red should be between 0 and 255"""					)
  
      if green < 0 or green > 255:
          raise Exception("""green should be between 0 and 255"""					)
  
      if blue < 0 or blue > 255:
          raise Exception("""blue should be between 0 and 255"""					)
  
      _SCREAMING_SNAKE_CASE             =    red / 255
      _SCREAMING_SNAKE_CASE             =    green / 255
      _SCREAMING_SNAKE_CASE             =    blue / 255
      _SCREAMING_SNAKE_CASE             =    max(__lowerCamelCase      , __lowerCamelCase      , __lowerCamelCase					)
      _SCREAMING_SNAKE_CASE             =    value - min(__lowerCamelCase      , __lowerCamelCase      , __lowerCamelCase					)
      _SCREAMING_SNAKE_CASE             =    0 if value == 0 else chroma / value
  
      if chroma == 0:
          _SCREAMING_SNAKE_CASE             =    0.0
      elif value == float_red:
          _SCREAMING_SNAKE_CASE             =    60 * (0 + (float_green - float_blue) / chroma)
      elif value == float_green:
          _SCREAMING_SNAKE_CASE             =    60 * (2 + (float_blue - float_red) / chroma)
      else:
          _SCREAMING_SNAKE_CASE             =    60 * (4 + (float_red - float_green) / chroma)
  
      _SCREAMING_SNAKE_CASE             =    (hue + 360) % 360
  
      return [hue, saturation, value]
  
  
  
  
  
  
  def lowerCamelCase		(  __lowerCamelCase				:					list[float]      , __lowerCamelCase				:					list[float]					)		->bool:
      _SCREAMING_SNAKE_CASE             =    abs(hsv_a[0] - hsv_a[0]					) < 0.2
      _SCREAMING_SNAKE_CASE             =    abs(hsv_a[1] - hsv_a[1]					) < 0.002
      _SCREAMING_SNAKE_CASE             =    abs(hsv_a[2] - hsv_a[2]					) < 0.002
  
      return check_hue and check_saturation and check_value
  
  
  
  