






def __A					(   __lowerCAmelCase			)->						list:





						"""simple docstring"""



						_UpperCAmelCase             =    len(__lowerCAmelCase			)

						# Set the gap value to be decreased by a factor of 1.3
						# after each iteration
						_UpperCAmelCase             =    1.3

						# Continue sorting until the gap is 1
						while gap > 1:
												# Decrease the gap value
												_UpperCAmelCase             =    int(gap / shrink			)

												# Sort the elements using insertion sort
												for i in range(__lowerCAmelCase				,	len(__lowerCAmelCase			)			):
																		_UpperCAmelCase             =    collection[i]
																		_UpperCAmelCase             =    i
																		while j >= gap and collection[j - gap] > temp:
																								_UpperCAmelCase             =    collection[j - gap]
																								j -= gap
																		_UpperCAmelCase             =    temp

						return collection


if __name__ == "__main__":
		import doctest

		doctest.testmod()








from typing import Any





class __lowerCamelCase				:





	"""simple docstring"""






	def __init__(							self					):
							"""simple docstring"""







							_UpperCAmelCase             =    []
							_UpperCAmelCase             =    0

	def __str__(							self					):
							"""simple docstring"""







							_UpperCAmelCase             =    '<' + str(self.stack					)[1:-1] + '>'
							return printed

	def  UpperCamelCase					(							self ,					UpperCAmelCase					):
							"""simple docstring"""







							self.stack.append(UpperCAmelCase					)
							_UpperCAmelCase             =    self.length + 1

	def  UpperCamelCase					(							self					):
							"""simple docstring"""







							self.rotate(1					)
							_UpperCAmelCase             =    self.stack[self.length - 1]
							_UpperCAmelCase             =    self.stack[:-1]
							self.rotate(self.length - 1					)
							_UpperCAmelCase             =    self.length - 1
							return dequeued

	def  UpperCamelCase					(							self ,					UpperCAmelCase					):
							"""simple docstring"""







							for _ in range(UpperCAmelCase					):
													_UpperCAmelCase             =    self.stack[0]
													_UpperCAmelCase             =    self.stack[1:]
													self.put(UpperCAmelCase					)
													_UpperCAmelCase             =    self.length - 1

	def  UpperCamelCase					(							self					):
							"""simple docstring"""







							_UpperCAmelCase             =    self.get()
							self.put(UpperCAmelCase					)
							self.rotate(self.length - 1					)
							return front

	def  UpperCamelCase					(							self					):
							"""simple docstring"""







							return self.length
