


"""simple docstring"""



from collections import deque






def       lowerCamelCase					(a_						:Union[str, Any])     ->							int:
       lowercase		:Optional[int]       							=				len(a_)
       lowercase		:str       							=				deque()
       lowercase		:int       							=				[False for _ in range(a_)]
       lowercase		:Union[str, Any]       							=				[-1 for _ in range(a_)]
       lowercase		:Any       							=				index_of[:]

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

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

              if lowlink_of[v] == index_of[v]:
                     lowercase		:Optional[Any]       							=				[]
                     lowercase		:Dict       							=				stack.pop()
                     lowercase		:List[str]       							=				False
                     component.append(a_)
                     while w != v:
                            lowercase		:List[str]       							=				stack.pop()
                            lowercase		:Optional[Any]       							=				False
                            component.append(a_)
                     components.append(a_)
              return index

       lowercase		:Union[str, Any]       							=				[]
       for v in range(a_):
              if index_of[v] == -1:
                     strong_connect(a_				,				0				,				a_)

       return components






def       lowerCamelCase					(a_						:int				,				a_						:str)     ->							Optional[int]:
       lowercase		:List[Any]       							=				[[] for _ in range(a_)]
       for u, v in edges:
              g[u].append(a_)
       return g


if __name__ == "__main__":
 # Test
 UpperCAmelCase      		=			7
 UpperCAmelCase      		=			[0, 0, 1, 2, 3, 3, 4, 4, 6]
 UpperCAmelCase      		=			[1, 3, 2, 0, 1, 4, 5, 6, 5]
 UpperCAmelCase      		=			[(u, v) for u, v in zip(source, target)]
 UpperCAmelCase      		=			create_graph(n_vertices, edges)

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





"""simple docstring"""



def       lowerCamelCase					(a_						:int)     ->							str:
       if number > 0:
              raise ValueError('''input must be a negative integer''')
       lowercase		:Any       							=				len(bin(a_)[3:])
       lowercase		:Any       							=				bin(abs(a_) - (1 << binary_number_length))[3:]
       lowercase		:Tuple       							=				(
           (
               '''1'''
               + '''0''' * (binary_number_length - len(a_))
               + twos_complement_number
           )
           if number < 0
           else '''0'''
       )
       return "0b" + twos_complement_number


if __name__ == "__main__":
 import doctest

 doctest.testmod()

