






"""simple docstring"""





class 	a		:






    def __init__(			self	:				Union[str, Any]   )	->						str:
      lowerCamelCase_       	=		{}






    def   UpperCamelCase			(			self	:				List[Any]   )	->						None:
      print(self.vertex   )
      for i in self.vertex:
        print(__SCREAMING_SNAKE_CASE			,		' -> '			,		' -> '.join([str(__SCREAMING_SNAKE_CASE   ) for j in self.vertex[i]]   )   )






    def   UpperCamelCase			(			self	:				Optional[int]			,		__SCREAMING_SNAKE_CASE	:				int			,		__SCREAMING_SNAKE_CASE	:				int   )	->						None:
      # check if vertex is already present,
      if from_vertex in self.vertex:
        self.vertex[from_vertex].append(__SCREAMING_SNAKE_CASE   )
      else:
        # else make a new vertex
        lowerCamelCase_       	=		[to_vertex]






    def   UpperCamelCase			(			self	:				Optional[int]   )	->						None:
      # visited array for storing already visited nodes
      lowerCamelCase_       	=		[False] * len(self.vertex   )

      # call the recursive helper function
      for i in range(len(self.vertex   )   ):
        if not visited[i]:
          self.dfs_recursive(__SCREAMING_SNAKE_CASE			,		__SCREAMING_SNAKE_CASE   )






    def   UpperCamelCase			(			self	:				Union[str, Any]			,		__SCREAMING_SNAKE_CASE	:				int			,		__SCREAMING_SNAKE_CASE	:				list   )	->						None:
      # mark start vertex as visited
      lowerCamelCase_       	=		True

      print(__SCREAMING_SNAKE_CASE			,		end=' '   )

      # Recur for all the vertices that are adjacent to this node
      for i in self.vertex:
        if not visited[i]:
          self.dfs_recursive(__SCREAMING_SNAKE_CASE			,		__SCREAMING_SNAKE_CASE   )


if __name__ == "__main__":
  _SCREAMING_SNAKE_CASE   :							Tuple          =		Graph()
  g.add_edge(0, 1)
  g.add_edge(0, 2)
  g.add_edge(1, 2)
  g.add_edge(2, 0)
  g.add_edge(2, 3)
  g.add_edge(3, 3)

  g.print_graph()
  print('''DFS:''')
  g.dfs()

  # OUTPUT:
  # 0  ->  1 -> 2
  # 1  ->  2
  # 2  ->  0 -> 3
  # 3  ->  3
  # DFS:
  #  0 1 2 3












"""simple docstring"""





def 	lowerCamelCase__			(				_lowerCamelCase			:						str					) ->							bool:
  lowerCamelCase_       	=		0
  for ch in input_str:
    lowerCamelCase_       	=		ord(_lowerCamelCase					)
    lowerCamelCase_       	=		pow(2						,							_lowerCamelCase					)

    # If we already turned on bit for current character's unicode
    if bitmap >> ch_unicode & 1 == 1:
      return False
    bitmap |= ch_bit_index_on
  return True


if __name__ == "__main__":
  import doctest

  doctest.testmod()




