def  snake_case						(__lowercase ,      __lowercase ,      __lowercase ,      __lowercase						)	->	bool:

						'''simple docstring'''



						if graph[path[curr_ind - 1]][next_ver] == 0:
												return False

						# 2. Validate that next vertex is not already in path
						return not any(vertex == next_ver for vertex in path						)
def  snake_case						(__lowercase ,      __lowercase ,      __lowercase						)	->	bool:

						'''simple docstring'''



						if curr_ind == len(__lowercase						):
												# return whether path exists between current and starting vertices
												return graph[path[curr_ind - 1]][path[0]] == 1

						# Recursive Step
						for next_ver in range(0 ,      len(__lowercase						)						):
												if valid_connection(__lowercase ,      __lowercase ,      __lowercase ,      __lowercase						):
																		# Insert current vertex  into path as next transition
																		_snake_case						:					Tuple    =   next_ver
																		# Validate created path
																		if util_hamilton_cycle(__lowercase ,      __lowercase ,      curr_ind + 1						):
																								return True
																		# Backtrack
																		_snake_case						:					Dict    =   -1
						return False

def  snake_case						(__lowercase ,      __lowercase = 0						)	->	list[int]:

						'''simple docstring'''



						_snake_case						:					Union[str, Any]    =   [-1] * (len(__lowercase						) + 1)
						# initialize start and end of path with starting index
						_snake_case						:					Any    =   start_index
						# evaluate and if we find answer return path either return empty array
						return path if util_hamilton_cycle(__lowercase ,      __lowercase ,      1						) else []
def  snake_case						(__lowercase						)	->	list[int]:

						'''simple docstring'''



						if num <= 0:
												raise ValueError("Input must be a positive integer"						)

						_snake_case						:					Any    =   [True] * (num + 1)

						_snake_case						:					str    =   2
						while p * p <= num:
												if primes[p]:
																		for i in range(p * p ,      num + 1 ,      __lowercase						):
																								_snake_case						:					Optional[int]    =   False
												p += 1

						return [prime for prime in range(2 ,      num + 1						) if primes[prime]]


if __name__ == "__main__":
				import doctest

				doctest.testmod()

				__SCREAMING_SNAKE_CASE						:   Any         =			int(input('Enter a positive integer: ').strip())
				print(prime_sieve_eratosthenes(user_num))