






from __future__ import annotations





def 					lowercase_ (    __snake_case     :							dict	,	__snake_case     :							str      )     -> set[str]:





				'''simple docstring'''


				snake_case__      :Tuple         =   set(__snake_case      ), [start]

				while stack:
								snake_case__      :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


__UpperCAmelCase							:   Optional[int]							=  {
    "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"))







def 					lowercase_ (    __snake_case     :							int      )     -> bool:





				'''simple docstring'''


				if p < 2:
								raise ValueError("p should not be less than 2!"      )
				elif p == 2:
								return True

				snake_case__      :List[str]         =   4
				snake_case__      :Optional[int]         =   (1 << p) - 1
				for _ in range(p - 2      ):
								snake_case__      :List[Any]         =   ((s * s) - 2) % m
				return s == 0


if __name__ == "__main__":
	print(lucas_lehmer_test(7))
	print(lucas_lehmer_test(1_1))