
def 				_lowerCamelCase      (       lowerCamelCase_:	list		):



				'''simple docstring'''







				if not isinstance(UpperCamelCase_					,						UpperCamelCase_		):
								raise ValueError('''Input series is not valid, valid series - [2, 4, 6]'''		)
				if len(UpperCamelCase_		) == 0:
								raise ValueError('''Input list must be a non empty list'''		)
				if len(UpperCamelCase_		) == 1:
								return True
				A  :	Optional[int]				=					series[1] - series[0]
				for index in range(len(UpperCamelCase_		) - 1		):
								if series[index + 1] - series[index] != common_diff:
												return False
				return True





def 				_lowerCamelCase      (       lowerCamelCase_:	list		):



				'''simple docstring'''







				if not isinstance(UpperCamelCase_					,						UpperCamelCase_		):
								raise ValueError('''Input series is not valid, valid series - [2, 4, 6]'''		)
				if len(UpperCamelCase_		) == 0:
								raise ValueError('''Input list must be a non empty list'''		)
				A  :	List[str]				=					0
				for val in series:
								answer += val
				return answer / len(UpperCamelCase_		)


if __name__ == "__main__":
					import doctest

					doctest.testmod()




from __future__ import annotations



def 		lowerCAmelCase__     (       UpperCamelCase_					:							dict			,							UpperCamelCase_					:							str						)->	set[str]:
    A__			,						A__					=       set(UpperCamelCase_						), [start]

    while stack:
        A__					=       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


_lowercase    	=		{
    "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"))
