


'''simple docstring'''



def   lowerCamelCase							(_SCREAMING_SNAKE_CASE				:       int						,				_SCREAMING_SNAKE_CASE				:       int       ):
     while a != 0:
          __a      :	int    =  b % a, a
     return b






def   lowerCamelCase							(_SCREAMING_SNAKE_CASE				:       int						,				_SCREAMING_SNAKE_CASE				:       int       ):
     if gcd(_SCREAMING_SNAKE_CASE						,				_SCREAMING_SNAKE_CASE       ) != 1:
          __a      :	List[str]    =  F"""mod inverse of {a!r} and {m!r} does not exist"""
          raise ValueError(_SCREAMING_SNAKE_CASE       )
     __a      :	List[Any]    =  1, 0, a
     __a      :	List[str]    =  0, 1, m
     while va != 0:
          __a      :	Optional[Any]    =  ua // va
          __a      :	Optional[int]    =  (ua - q * va), (ua - q * va), (ua - q * va), va, va, va
     return ua % m







'''simple docstring'''



__lowercase     :						Optional[Any]	=     {'a': ['c', 'b'], 'b': ['d', 'e'], 'c': [], 'd': [], 'e': []}
__lowercase     :						List[str]	=     ['a', 'b', 'c', 'd', 'e']






def   lowerCamelCase							(_SCREAMING_SNAKE_CASE				:       List[Any]						,				_SCREAMING_SNAKE_CASE				:       Any						,				_SCREAMING_SNAKE_CASE				:       List[str]       ):
					__a      :	Any    =  start
					# add current to visited
					visited.append(_SCREAMING_SNAKE_CASE       )
					__a      :	Union[str, Any]    =  edges[current]
					for neighbor in neighbors:
										# if neighbor not in visited, visit
										if neighbor not in visited:
															__a      :	Dict    =  topological_sort(_SCREAMING_SNAKE_CASE						,				_SCREAMING_SNAKE_CASE						,				_SCREAMING_SNAKE_CASE       )
    # if all neighbors visited add current to sort
					sort.append(_SCREAMING_SNAKE_CASE       )
					# if all vertices haven't been visited select a new one to visit
					if len(_SCREAMING_SNAKE_CASE       ) != len(_SCREAMING_SNAKE_CASE       ):
										for vertice in vertices:
															if vertice not in visited:
																				__a      :	List[Any]    =  topological_sort(_SCREAMING_SNAKE_CASE						,				_SCREAMING_SNAKE_CASE						,				_SCREAMING_SNAKE_CASE       )
    # return sort
					return sort


if __name__ == "__main__":
	__lowercase     :						Union[str, Any]	=     topological_sort('a', [], [])
	print(sort)



