


'''simple docstring'''


def      lowerCamelCase					(      lowerCamelCase  :      list							,						lowerCamelCase  :      int							,						lowerCamelCase  :      int = 0							,						lowerCamelCase  :      int = 0):
      A_						:  str          =				right or len(lowerCamelCase) - 1
      if left > right:
            return -1
      elif list_data[left] == key:
            return left
      elif list_data[right] == key:
            return right
      else:
            return search(lowerCamelCase							,						lowerCamelCase							,						left + 1							,						right - 1)


if __name__ == "__main__":
     import doctest

     doctest.testmod()




'''simple docstring'''


from __future__ import annotations




def      lowerCamelCase					(      lowerCamelCase  :      dict							,						lowerCamelCase  :      str):
      A_   ,					A_						:  List[Any]          =				set(lowerCamelCase), [start]

      while stack:
            A_						:  Optional[Any]          =				stack.pop()
            explored.add(lowerCamelCase)
            # 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(lowerCamelCase)
      return explored


__magic_name__			=      {
    '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'))
