




from collections import deque

def       _SCREAMING_SNAKE_CASE      (							lowercase     :	Dict					):


      '''simple docstring'''



      lowerCamelCase_							=   len(lowercase					)
      lowerCamelCase_							=   deque()
      lowerCamelCase_							=   [False for _ in range(lowercase					)]
      lowerCamelCase_							=   [-1 for _ in range(lowercase					)]
      lowerCamelCase_							=   index_of[:]

      def strong_connect(lowercase     :	Tuple     ,							lowercase     :	Optional[Any]     ,							lowercase     :	Union[str, Any]					):
            lowerCamelCase_							=   index  # the number when this node is seen
            lowerCamelCase_							=   index  # lowest rank node reachable from here
            index += 1
            stack.append(lowercase					)
            lowerCamelCase_							=   True

            for w in g[v]:
                  if index_of[w] == -1:
                        lowerCamelCase_							=   strong_connect(lowercase     ,							lowercase     ,							lowercase					)
                        lowerCamelCase_							=   (
                            lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
                        )
                  elif on_stack[w]:
                        lowerCamelCase_							=   (
                            lowlink_of[w] if lowlink_of[w] < lowlink_of[v] else lowlink_of[v]
                        )

            if lowlink_of[v] == index_of[v]:
                  lowerCamelCase_							=   []
                  lowerCamelCase_							=   stack.pop()
                  lowerCamelCase_							=   False
                  component.append(lowercase					)
                  while w != v:
                        lowerCamelCase_							=   stack.pop()
                        lowerCamelCase_							=   False
                        component.append(lowercase					)
                  components.append(lowercase					)
            return index

      lowerCamelCase_							=   []
      for v in range(lowercase					):
            if index_of[v] == -1:
                  strong_connect(lowercase     ,							0     ,							lowercase					)

      return components

def       _SCREAMING_SNAKE_CASE      (							lowercase     :	List[Any]     ,							lowercase     :	str					):


      '''simple docstring'''



      lowerCamelCase_							=   [[] for _ in range(lowercase					)]
      for u, v in edges:
            g[u].append(lowercase					)
      return g


if __name__ == "__main__":
    # Test
    lowerCamelCase    :		Optional[Any]			   =       7
    lowerCamelCase    :		Tuple			   =       [0, 0, 1, 2, 3, 3, 4, 4, 6]
    lowerCamelCase    :		Dict			   =       [1, 3, 2, 0, 1, 4, 5, 6, 5]
    lowerCamelCase    :		Optional[int]			   =       [(u, v) for u, v in zip(source, target)]
    lowerCamelCase    :		Union[str, Any]			   =       create_graph(n_vertices, edges)

    assert [[5], [6], [4], [3, 2, 1, 0]] == tarjan(g)









import math

def       _SCREAMING_SNAKE_CASE      (							lowercase     :	int					):


      '''simple docstring'''



      lowerCamelCase_							=   0
      lowerCamelCase_							=   0
      while num > 0:
            lowerCamelCase_							=   num % 8
            lowerCamelCase_							=   octal + (remainder * math.floor(math.pow(10     ,							lowercase					)					))
            counter += 1
            lowerCamelCase_							=   math.floor(num / 8					)  # basically /= 8 without remainder if any
            # This formatting removes trailing '.0' from `octal`.
      return f"""0o{int(lowercase					)}"""

def       _SCREAMING_SNAKE_CASE      (							):


      '''simple docstring'''



      print('\n2 in octal is:'					)
      print(decimal_to_octal(2					)					)  # = 2
      print('\n8 in octal is:'					)
      print(decimal_to_octal(8					)					)  # = 10
      print('\n65 in octal is:'					)
      print(decimal_to_octal(65					)					)  # = 101
      print('\n216 in octal is:'					)
      print(decimal_to_octal(2_16					)					)  # = 330
      print('\n512 in octal is:'					)
      print(decimal_to_octal(5_12					)					)  # = 1000
      print('\n'					)


if __name__ == "__main__":
 main()



