
"""simple docstring"""







def    __lowerCAmelCase    (_UpperCamelCase	,  _UpperCamelCase		):
	__lowerCAmelCase      :						list[list[str]]						      =				[[] for _ in range(_UpperCamelCase		)]
	__lowerCAmelCase      :						Optional[Any]						      =				key - 1

	if key <= 0:
		raise ValueError('Height of grid can\'t be 0 or negative'		)
	if key == 1 or len(_UpperCamelCase		) <= key:
		return input_string

	for position, character in enumerate(_UpperCamelCase		):
		__lowerCAmelCase      :						Union[str, Any]						      =				position % (lowest * 2)  # puts it in bounds
		__lowerCAmelCase      :						Optional[Any]						      =				min(_UpperCamelCase	,  lowest * 2 - num		)  # creates zigzag pattern
		temp_grid[num].append(_UpperCamelCase		)
	__lowerCAmelCase      :						Optional[Any]						      =				[''.join(_UpperCamelCase		) for row in temp_grid]
	__lowerCAmelCase      :						int						      =				''.join(_UpperCamelCase		)

	return output_string
def    __lowerCAmelCase    (_UpperCamelCase	,  _UpperCamelCase		):
	__lowerCAmelCase      :						Dict						      =				[]
	__lowerCAmelCase      :						Union[str, Any]						      =				key - 1

	if key <= 0:
		raise ValueError('Height of grid can\'t be 0 or negative'		)
	if key == 1:
		return input_string

	__lowerCAmelCase      :						list[list[str]]						      =				[[] for _ in range(_UpperCamelCase		)]  # generates template
	for position in range(len(_UpperCamelCase		)		):
		__lowerCAmelCase      :						Tuple						      =				position % (lowest * 2)  # puts it in bounds
		__lowerCAmelCase      :						Tuple						      =				min(_UpperCamelCase	,  lowest * 2 - num		)  # creates zigzag pattern
		temp_grid[num].append('*'		)

	__lowerCAmelCase      :						str						      =				0
	for row in temp_grid:  # fills in the characters
		__lowerCAmelCase      :						int						      =				input_string[counter : counter + len(_UpperCamelCase		)]
		grid.append(list(_UpperCamelCase		)		)
		counter += len(_UpperCamelCase		)

	__lowerCAmelCase      :						List[Any]						      =				''  # reads as zigzag
	for position in range(len(_UpperCamelCase		)		):
		__lowerCAmelCase      :						str						      =				position % (lowest * 2)  # puts it in bounds
		__lowerCAmelCase      :						Any						      =				min(_UpperCamelCase	,  lowest * 2 - num		)  # creates zigzag pattern
		output_string += grid[num][0]
		grid[num].pop(0		)
	return output_string
def    __lowerCAmelCase    (_UpperCamelCase		):
	__lowerCAmelCase      :						Dict						      =				{}
	for key_guess in range(1	,  len(_UpperCamelCase		)		):  # tries every key
		__lowerCAmelCase      :						Tuple						      =				decrypt(_UpperCamelCase	,  _UpperCamelCase		)
	return results


if __name__ == "__main__":
							import doctest

							doctest.testmod()

"""simple docstring"""







def    __lowerCAmelCase    (_UpperCamelCase		):
	if len(_UpperCamelCase		) <= 1:
		return lst

	__lowerCAmelCase      :						str						      =				1

	while i < len(_UpperCamelCase		):
		if lst[i - 1] <= lst[i]:
			i += 1
		else:
			__lowerCAmelCase      ,       __lowerCAmelCase      :						List[Any]						      =				lst[i], lst[i - 1]
			i -= 1
			if i == 0:
				__lowerCAmelCase      :						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))