




from __future__ import annotations

from collections.abc import Generator



def    UpperCAmelCase							(  _snake_case				):






							if not isinstance(_snake_case    ,			_snake_case				) or n < 1:
														raise Exception('''Sequence only defined for positive integers'''				)

							yield n
							while n != 1:
														if n % 2 == 0:
																					n //= 2
														else:
																					lowerCAmelCase =		3 * n + 1
														yield n



def    UpperCAmelCase							(  ):
							lowerCAmelCase =		43
							lowerCAmelCase =		tuple(collatz_sequence(_snake_case				)				)
							print(_snake_case				)
							print(F"""Collatz sequence from {n} took {len(_snake_case				)} steps."""				)


if __name__ == "__main__":
		main()










def _a							(      lowerCamelCase:  List[Any]					)      ->		Optional[Any]:







      '''simple docstring'''






      __A			  =							[7_01, 3_01, 1_32, 57, 23, 10, 4, 1]
      for gap in gaps:
            for i in range(lowerCamelCase   ,							len(lowerCamelCase					)					):
                  __A			  =							collection[i]
                  __A			  =							i
                  while j >= gap and collection[j - gap] > insert_value:
                        __A			  =							collection[j - gap]
                        j -= gap
                  if j != i:
                        __A			  =							insert_value
      return collection


if __name__ == "__main__":
       from doctest import testmod

       testmod()
       snake_case__   :				Optional[int]						=	input('Enter numbers separated by a comma:\n').strip()
       snake_case__   :				int						=	[int(item) for item in user_input.split(',')]
       print(shell_sort(unsorted))





