






"""simple docstring"""
def 			__UpperCamelCase	(		snake_case__					):
	if len(snake_case__					) <= 1:
		return lst

	A_		:						Optional[int]	    =   1

	while i < len(snake_case__					):
		if lst[i - 1] <= lst[i]:
			i += 1
		else:
			A_    ,     A_		:						Union[str, Any]	    =   lst[i], lst[i - 1]
			i -= 1
			if i == 0:
				A_		:						Optional[int]	    =   1

	return lst


if __name__ == "__main__":
							_lowerCAmelCase         =							input("Enter numbers separated by a comma:\n").strip()
							_lowerCAmelCase         =							[int(item) for item in user_input.split(",")]
							print(gnome_sort(unsorted))









"""simple docstring"""
_lowerCAmelCase         =							{"a": ["c", "b"], "b": ["d", "e"], "c": [], "d": [], "e": []}
_lowerCAmelCase         =							["a", "b", "c", "d", "e"]






def 			__UpperCamelCase	(		snake_case__   ,   snake_case__   ,   snake_case__					):
	A_		:						int	    =   start
	# add current to visited
	visited.append(snake_case__					)
	A_		:						Any	    =   edges[current]
	for neighbor in neighbors:
		# if neighbor not in visited, visit
		if neighbor not in visited:
			A_		:						Optional[Any]	    =   topological_sort(snake_case__   ,   snake_case__   ,   snake_case__					)
    # if all neighbors visited add current to sort
	sort.append(snake_case__					)
	# if all vertices haven't been visited select a new one to visit
	if len(snake_case__					) != len(snake_case__					):
		for vertice in vertices:
			if vertice not in visited:
				A_		:						Optional[Any]	    =   topological_sort(snake_case__   ,   snake_case__   ,   snake_case__					)
    # return sort
	return sort


if __name__ == "__main__":
							_lowerCAmelCase         =							topological_sort("a", [], [])
							print(sort)

