



"""simple docstring"""
from __future__ import annotations

def    _snake_case		(		UpperCamelCase		:	dict    ,	UpperCamelCase		:	str		):
 UpperCAmelCase			:      str			=			set(UpperCamelCase		), [start]

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


A:     Union[str, Any]										=	{
    "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"""
def    _snake_case		(		UpperCamelCase		:	int    ,	UpperCamelCase		:	int		):
 return 1 if input_a == input_a else 0

def    _snake_case		(		):
 assert xnor_gate(0    ,	0		) == 1
 assert xnor_gate(0    ,	1		) == 0
 assert xnor_gate(1    ,	0		) == 0
 assert xnor_gate(1    ,	1		) == 1


if __name__ == "__main__":
      print(xnor_gate(0, 0))
      print(xnor_gate(0, 1))
      print(xnor_gate(1, 0))
      print(xnor_gate(1, 1))
