


'''simple docstring'''


from __future__ import annotations






def  __lowerCAmelCase (__lowerCAmelCase      , __lowerCAmelCase   ):
		_UpperCAmelCase		:       List[str]								=      set(snake_case__   ), [start]

		while stack:
				_UpperCAmelCase		:       Dict								=      stack.pop()
				explored.add(snake_case__   )
				# 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(snake_case__   )
		return explored


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







'''simple docstring'''


from __future__ import annotations

import numpy as np






def  __lowerCAmelCase (__lowerCAmelCase   ):
		return np.maximum(0      , __lowerCAmelCase   )


if __name__ == "__main__":
						print(np.array(relu([-1, 0, 5])))  # --> [0, 0, 5]



