

'''simple docstring'''

def     __magic_name__       ( A							)			->		List[str]:
	snake_case							 =				[7_0_1, 3_0_1, 1_3_2, 5_7, 2_3, 1_0, 4, 1]
	for gap in gaps:
		for i in range(A					,   len(A							)							):
			snake_case							 =				collection[i]
			snake_case							 =				i
			while j >= gap and collection[j - gap] > insert_value:
				snake_case							 =				collection[j - gap]
				j -= gap
			if j != i:
				snake_case							 =				insert_value
	return collection


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

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








'''simple docstring'''

from itertools import compress, repeat
from math import ceil, sqrt

def     __magic_name__       ( A							)			->		list[int]:

	if num <= 2:
		return []
	if num == 3:
		return [2]

	# Odd sieve for numbers in range [3, num - 1]
	snake_case							 =				bytearray(b'\x01'							) * ((num >> 1) - 1)

	for i in range(3					,   int(sqrt(A							)							) + 1					,   2							):
		if sieve[(i >> 1) - 1]:
			snake_case							 =				i**2
			snake_case							 =				repeat(
			    0					,   ceil((num - i_squared) / (i << 1)							)							)

	return [2] + list(compress(range(3					,   A					,   2							)					,   A							)							)


if __name__ == "__main__":
						import doctest

						doctest.testmod()





