






from __future__ import annotations

from typing import Generic, TypeVar

__lowerCamelCase      :    int   		=   TypeVar("""T""")



class 							SCREAMING_SNAKE_CASE__		(       Generic[T]		):





					"""simple docstring"""






					def __init__(      self  :						Union[str, Any]							,	__A  :						T ):
						snake_case__				:   int     =						data
						snake_case__				:   str     =						self
						snake_case__				:   str     =						0



class 							SCREAMING_SNAKE_CASE__		(       Generic[T]		):





					"""simple docstring"""






					def __init__(      self  :						Any ):
						snake_case__				:   dict[T, DisjointSetTreeNode[T]]     =						{}



					def  _lowercase  (      self  :						Union[str, Any]							,	__A  :						T ):
						snake_case__				:   List[Any]     =						DisjointSetTreeNode(lowerCamelCase__ )



					def  _lowercase  (      self  :						int							,	__A  :						T ):
						snake_case__				:   Any     =						self.map[data]
						if elem_ref != elem_ref.parent:
							snake_case__				:   List[str]     =						self.find_set(elem_ref.parent.data )
						return elem_ref.parent



					def  _lowercase  (      self  :						List[str]							,	__A  :						DisjointSetTreeNode[T]							,	__A  :						DisjointSetTreeNode[T] ):







						if nodea.rank > nodea.rank:
							snake_case__				:   Dict     =						nodea
						else:
							snake_case__				:   Union[str, Any]     =						nodea
							if nodea.rank == nodea.rank:
								nodea.rank += 1






					def  _lowercase  (      self  :						Optional[Any]							,	__A  :						T							,	__A  :						T ):
						self.link(self.find_set(lowerCamelCase__ )							,	self.find_set(lowerCamelCase__ ) )



class 							SCREAMING_SNAKE_CASE__		(       Generic[T]		):





					"""simple docstring"""






					def __init__(      self  :						int ):
						snake_case__				:   dict[T, dict[T, int]]     =						{}



					def  _lowercase  (      self  :						Union[str, Any]							,	__A  :						T ):







						if node not in self.connections:
							snake_case__				:   List[str]     =						{}



					def  _lowercase  (      self  :						List[str]							,	__A  :						T							,	__A  :						T							,	__A  :						int ):
						self.add_node(lowerCamelCase__ )
						self.add_node(lowerCamelCase__ )
						snake_case__				:   Dict     =						weight
						snake_case__				:   str     =						weight






					def  _lowercase  (      self  :						List[Any] ):
						snake_case__				:   str     =						[]
						snake_case__				:   Any     =						set()
						for start in self.connections:
							for end in self.connections[start]:
								if (start, end) not in seen:
									seen.add((end, start) )
									edges.append((start, end, self.connections[start][end]) )
						edges.sort(key=lambda __A : x[2] )

						# creating the disjoint set
						snake_case__				:   Tuple     =						DisjointSetTree[T]()
						for node in self.connections:
							disjoint_set.make_set(lowerCamelCase__ )

						# MST generation
						snake_case__				:   List[Any]     =						0
						snake_case__				:   Tuple     =						0
						snake_case__				:   str     =						GraphUndirectedWeighted[T]()
						while num_edges < len(self.connections ) - 1:
							snake_case__				:   Union[str, Any]     =						edges[index]
							index += 1
							snake_case__				:   Union[str, Any]     =						disjoint_set.find_set(lowerCamelCase__ )
							snake_case__				:   int     =						disjoint_set.find_set(lowerCamelCase__ )
							if parent_u != parent_v:
								num_edges += 1
								graph.add_edge(lowerCamelCase__							,	lowerCamelCase__							,	lowerCamelCase__ )
								disjoint_set.union(lowerCamelCase__							,	lowerCamelCase__ )
						return graph











def   SCREAMING_SNAKE_CASE       (				snake_case_      :							list     ):
	if len(snake_case_     ) <= 1:
		return lst

	snake_case__				:   List[Any]     =						1

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

	return lst


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



