



def 				A			(		__UpperCAmelCase	)       ->       str:



						'''simple docstring'''






						UpperCAmelCase_     							=     len(__UpperCAmelCase	)
						for _ in range(
						    0							,					int(((no_of_elements - 1) / 2) + 1	)	):  # we don't need to traverse to end of list as
												for j in range(0							,					no_of_elements - 1	):
																		if (
																		    lst[j + 1] < lst[j]
																		):  # applying bubble sort algorithm from left to right (or forwards)
																								UpperCAmelCase_     							=     lst[j + 1]
																								UpperCAmelCase_     							=     lst[j]
																								UpperCAmelCase_     							=     temp
																		if (
																		    lst[no_of_elements - 1 - j] < lst[no_of_elements - 2 - j]
																		):  # applying bubble sort algorithm from right to left (or backwards)
																								UpperCAmelCase_     							=     lst[no_of_elements - 1 - j]
																								UpperCAmelCase_     							=     lst[no_of_elements - 2 - j]
																								UpperCAmelCase_     							=     temp
						return lst


if __name__ == "__main__":
							print("enter the list to be sorted")
							UpperCamelCase_	       =   [int(x) for x in input().split()]  # inputing elements of the list in one line
							UpperCamelCase_	       =   double_sort(lst)
							print("the sorted list is")
							print(sorted_lst)













from __future__ import annotations

from collections.abc import Generator

def    lowerCAmelCase__		(			_a				:	int			):
		if not isinstance(_a     ,					_a			) or n < 1:
				raise Exception("Sequence only defined for positive integers"			)

		yield n
		while n != 1:
				if n % 2 == 0:
						n //= 2
				else:
						snake_case_ :							List[str]         =				3 * n + 1
				yield n

def    lowerCAmelCase__		(			):
		snake_case_ :							Optional[int]         =				43
		snake_case_ :							Union[str, Any]         =				tuple(collatz_sequence(_a			)			)
		print(_a			)
		print(F'''Collatz sequence from {n} took {len(_a			)} steps.'''			)


if __name__ == "__main__":
							main()
