






'''simple docstring'''







_A	:			Any         ={'''a''': ['''c''', '''b'''], '''b''': ['''d''', '''e'''], '''c''': [], '''d''': [], '''e''': []}
_A	:			Optional[Any]         =['''a''', '''b''', '''c''', '''d''', '''e''']





def  SCREAMING_SNAKE_CASE_       (UpperCamelCase				,			UpperCamelCase				,			UpperCamelCase      )      ->       Union[str, Any]:
							lowerCamelCase__					:	str         =       start
							# add current to visited
							visited.append(UpperCamelCase      )
							lowerCamelCase__					:	Optional[Any]         =       edges[current]
							for neighbor in neighbors:
														# if neighbor not in visited, visit
														if neighbor not in visited:
																					lowerCamelCase__					:	str         =       topological_sort(UpperCamelCase				,			UpperCamelCase				,			UpperCamelCase      )
    # if all neighbors visited add current to sort
							sort.append(UpperCamelCase      )
							# if all vertices haven't been visited select a new one to visit
							if len(UpperCamelCase      ) != len(UpperCamelCase      ):
														for vertice in vertices:
																					if vertice not in visited:
																												lowerCamelCase__					:	Union[str, Any]         =       topological_sort(UpperCamelCase				,			UpperCamelCase				,			UpperCamelCase      )
    # return sort
							return sort


if __name__ == "__main__":
			_A	:			Optional[Any]         =topological_sort('''a''', [], [])
			print(sort)









'''simple docstring'''







def  SCREAMING_SNAKE_CASE_       (UpperCamelCase				,			UpperCamelCase      )      ->       int:
							return abs(UpperCamelCase      ) if a == 0 else greatest_common_divisor(b % a				,			UpperCamelCase      )





def  SCREAMING_SNAKE_CASE_       (UpperCamelCase				,			UpperCamelCase      )      ->       int:
							while y:  # --> when y=0 then loop will terminate and return x as final GCD.
														lowerCamelCase__  ,		lowerCamelCase__					:	Tuple         =       y, x % y
							return abs(UpperCamelCase      )





def  SCREAMING_SNAKE_CASE_       ()      ->       Tuple:
							try:
														lowerCamelCase__					:	Dict         =       input("""Enter two integers separated by comma (,): """      ).split(""","""      )
														lowerCamelCase__					:	Any         =       int(nums[0]      )
														lowerCamelCase__					:	Optional[Any]         =       int(nums[1]      )
														print(
														    f'''greatest_common_divisor({num_a}, {num_a}) = '''
														    f'''{greatest_common_divisor(UpperCamelCase				,			UpperCamelCase      )}'''      )
														print(f'''By iterative gcd({num_a}, {num_a}) = {gcd_by_iterative(UpperCamelCase				,			UpperCamelCase      )}'''      )
							except (IndexError, UnboundLocalError, ValueError):
														print("""Wrong input"""      )


if __name__ == "__main__":
			main()

