


'''simple docstring'''


class        lowercase__    :





							'''simple docstring'''


							def __init__(       self       ,   __snake_case    ):
											_SCREAMING_SNAKE_CASE					:			Tuple							= n
											_SCREAMING_SNAKE_CASE					:			Optional[int]							= [None] * self.n
											_SCREAMING_SNAKE_CASE					:			Optional[int]							= 0  # index of the first element
											_SCREAMING_SNAKE_CASE					:			Union[str, Any]							= 0
											_SCREAMING_SNAKE_CASE					:			str							= 0






							def __len__(       self    ):
											return self.size






							def UpperCAmelCase_      (       self    ):
											return self.size == 0






							def UpperCAmelCase_      (       self    ):
											return False if self.is_empty() else self.array[self.front]






							def UpperCAmelCase_      (       self       ,   __snake_case    ):
											if self.size >= self.n:
															raise Exception("""QUEUE IS FULL"""    )

											_SCREAMING_SNAKE_CASE					:			Dict							= data
											_SCREAMING_SNAKE_CASE					:			Any							= (self.rear + 1) % self.n
											self.size += 1
											return self






							def UpperCAmelCase_      (       self    ):
											if self.size == 0:
															raise Exception("""UNDERFLOW"""    )

											_SCREAMING_SNAKE_CASE					:			Any							= self.array[self.front]
											_SCREAMING_SNAKE_CASE					:			Dict							= None
											_SCREAMING_SNAKE_CASE					:			Optional[int]							= (self.front + 1) % self.n
											self.size -= 1
											return temp








'''simple docstring'''


from __future__ import annotations







def      snake_case_  (    SCREAMING_SNAKE_CASE__				, SCREAMING_SNAKE_CASE__	):







				"""simple docstring"""





				if len(SCREAMING_SNAKE_CASE__	) <= 1 or n <= 1:
								return

				insert_next(SCREAMING_SNAKE_CASE__				, n - 1	)
				rec_insertion_sort(SCREAMING_SNAKE_CASE__				, n - 1	)







def      snake_case_  (    SCREAMING_SNAKE_CASE__				, SCREAMING_SNAKE_CASE__	):







				"""simple docstring"""





				if index >= len(SCREAMING_SNAKE_CASE__	) or collection[index - 1] <= collection[index]:
								return

				# Swaps adjacent elements since they are not in ascending order
				_SCREAMING_SNAKE_CASE						,			_SCREAMING_SNAKE_CASE					:			List[Any]							= (
				    collection[index],
				    collection[index - 1],
				)

				insert_next(SCREAMING_SNAKE_CASE__				, index + 1	)


if __name__ == "__main__":
				UpperCAmelCase_						:  List[str]				  =						input('Enter integers separated by spaces: ')
				UpperCAmelCase_						:  list[int]				  =						[int(num) for num in numbers.split()]
				rec_insertion_sort(number_list, len(number_list))
				print(number_list)




