





from ..utils import DummyObject, requires_backends

class      A       (	metaclass=__lowercase						):
      _snake_case							     =['''flax''', '''transformers''']



      def __init__(	self:						List[str]		,  *_lowerCAmelCase:						Optional[int]		,  **_lowerCAmelCase:						Tuple       )						->    Tuple:
         '''simple docstring'''

         requires_backends(self		,  ["flax", "transformers"]       )



      @classmethod
      def 	lowerCAmelCase__    (	cls:						List[Any]		,  *_lowerCAmelCase:						str		,  **_lowerCAmelCase:						List[str]       )						->    List[Any]:
         '''simple docstring'''

         requires_backends(cls		,  ["flax", "transformers"]       )






      @classmethod
      def 	lowerCAmelCase__    (	cls:						Optional[int]		,  *_lowerCAmelCase:						List[str]		,  **_lowerCAmelCase:						Tuple       )						->    Optional[Any]:
         '''simple docstring'''

         requires_backends(cls		,  ["flax", "transformers"]       )

class      A       (	metaclass=__lowercase						):
      _snake_case							     =['''flax''', '''transformers''']



      def __init__(	self:						Tuple		,  *_lowerCAmelCase:						List[str]		,  **_lowerCAmelCase:						Tuple       )						->    int:
         '''simple docstring'''

         requires_backends(self		,  ["flax", "transformers"]       )



      @classmethod
      def 	lowerCAmelCase__    (	cls:						int		,  *_lowerCAmelCase:						Tuple		,  **_lowerCAmelCase:						str       )						->    Dict:
         '''simple docstring'''

         requires_backends(cls		,  ["flax", "transformers"]       )






      @classmethod
      def 	lowerCAmelCase__    (	cls:						Optional[Any]		,  *_lowerCAmelCase:						List[Any]		,  **_lowerCAmelCase:						Any       )						->    Any:
         '''simple docstring'''

         requires_backends(cls		,  ["flax", "transformers"]       )

class      A       (	metaclass=__lowercase						):
      _snake_case							     =['''flax''', '''transformers''']



      def __init__(	self:						Any		,  *_lowerCAmelCase:						Tuple		,  **_lowerCAmelCase:						Dict       )						->    Optional[int]:
         '''simple docstring'''

         requires_backends(self		,  ["flax", "transformers"]       )



      @classmethod
      def 	lowerCAmelCase__    (	cls:						str		,  *_lowerCAmelCase:						int		,  **_lowerCAmelCase:						List[Any]       )						->    Optional[int]:
         '''simple docstring'''

         requires_backends(cls		,  ["flax", "transformers"]       )






      @classmethod
      def 	lowerCAmelCase__    (	cls:						Any		,  *_lowerCAmelCase:						Tuple		,  **_lowerCAmelCase:						Optional[int]       )						->    Optional[Any]:
         '''simple docstring'''

         requires_backends(cls		,  ["flax", "transformers"]       )

class      A       (	metaclass=__lowercase						):
      _snake_case							     =['''flax''', '''transformers''']



      def __init__(	self:						List[str]		,  *_lowerCAmelCase:						Any		,  **_lowerCAmelCase:						List[str]       )						->    Tuple:
         '''simple docstring'''

         requires_backends(self		,  ["flax", "transformers"]       )



      @classmethod
      def 	lowerCAmelCase__    (	cls:						Tuple		,  *_lowerCAmelCase:						Optional[int]		,  **_lowerCAmelCase:						Union[str, Any]       )						->    Optional[Any]:
         '''simple docstring'''

         requires_backends(cls		,  ["flax", "transformers"]       )






      @classmethod
      def 	lowerCAmelCase__    (	cls:						Dict		,  *_lowerCAmelCase:						Optional[Any]		,  **_lowerCAmelCase:						List[str]       )						->    Union[str, Any]:
         '''simple docstring'''

         requires_backends(cls		,  ["flax", "transformers"]       )











from __future__ import annotations




def     a__ (					lowercase__  ,    lowercase__  ):






   '''simple docstring'''






   UpperCAmelCase_						,       UpperCAmelCase_											=set(lowercase__  ), [start]

   while stack:
      UpperCAmelCase_											=stack.pop()
      explored.add(lowercase__  )
      # Differences from BFS:
      # 1) pop last element instead of first one
      # 2) add adjacent elements to stack without exploring them
      for adj in reversed(graph[v]  ):
         if adj not in explored:
            stack.append(lowercase__  )
   return explored


__lowercase  :   Dict						      ={
    """A""": ["""B""", """C""", """D"""],
    """B""": ["""A""", """D""", """E"""],
    """C""": ["""A""", """F"""],
    """D""": ["""B""", """D"""],
    """E""": ["""B""", """F"""],
    """F""": ["""C""", """E""", """G"""],
    """G""": ["""F"""],
}

if __name__ == "__main__":
     import doctest

     doctest.testmod()
     print(depth_first_search(G, """A"""))




