


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







def 						_a				(      _SCREAMING_SNAKE_CASE				, _SCREAMING_SNAKE_CASE				)    ->				set[str]:
							snake_case_       ,						snake_case_           =		set(_SCREAMING_SNAKE_CASE				), [start]

							while stack:
														snake_case_           =		stack.pop()
														explored.add(_SCREAMING_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(_SCREAMING_SNAKE_CASE				)
							return explored


__SCREAMING_SNAKE_CASE							:    List[str]		=    {
    '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"""
__SCREAMING_SNAKE_CASE							:    str		=    'Input must be a string of 8 numbers plus letter'
__SCREAMING_SNAKE_CASE							:    Dict		=    'TRWAGMYFPDXBNJZSQVHLCKE'







def 						_a				(      _SCREAMING_SNAKE_CASE				)    ->				bool:

							if not isinstance(_SCREAMING_SNAKE_CASE				, _SCREAMING_SNAKE_CASE				):
														snake_case_           =		f"""Expected string as input, found {type(_SCREAMING_SNAKE_CASE				).__name__}"""
														raise TypeError(_SCREAMING_SNAKE_CASE				)

							snake_case_           =		spanish_id.replace("""-"""				, """"""				).upper()
							if len(_SCREAMING_SNAKE_CASE				) != 9:
														raise ValueError(_SCREAMING_SNAKE_CASE				)

							try:
														snake_case_           =		int(spanish_id_clean[0:8]				)
														snake_case_           =		spanish_id_clean[8]
							except ValueError as ex:
														raise ValueError(_SCREAMING_SNAKE_CASE				) from ex

							if letter.isdigit():
														raise ValueError(_SCREAMING_SNAKE_CASE				)

							return letter == LOOKUP_LETTERS[number % 23]


if __name__ == "__main__":
				import doctest

				doctest.testmod()



