




from typing import List

from .keymap import KEYMAP, get_character


def 						lowerCamelCase__    (		_A							):







	'''simple docstring'''





	def decorator(_A							):
		snake_case_		    =     getattr(_A     ,	"handle_key"     ,	[]							)
		handle += [key]
		setattr(_A     ,	"handle_key"     ,	_A							)
		return func

	return decorator


def 						lowerCamelCase__    (		*_A							):







	'''simple docstring'''





	def decorator(_A							):
		snake_case_		    =     getattr(_A     ,	"handle_key"     ,	[]							)
		handle += keys
		setattr(_A     ,	"handle_key"     ,	_A							)
		return func

	return decorator
class 		UpperCAmelCase   (				UpperCAmelCase__			):







						'''simple docstring'''





						def __new__(						cls							:     List[Any]       ,	__lowercase							:     Tuple       ,	__lowercase							:     Any       ,	__lowercase							:     Tuple						):






							"""simple docstring"""






							snake_case_		    =     super().__new__(cls       ,	__lowercase       ,	__lowercase       ,	__lowercase						)
							if not hasattr(__lowercase       ,	"key_handler"						):
								setattr(__lowercase       ,	"key_handler"       ,	{}						)
							setattr(__lowercase       ,	"handle_input"       ,	KeyHandler.handle_input						)

							for value in attrs.values():
								snake_case_		    =     getattr(__lowercase       ,	"handle_key"       ,	[]						)
								for key in handled_keys:
									snake_case_		    =     value
							return new_cls






						@staticmethod
						def        snake_case__						(						cls							:     str						):






							"""simple docstring"""






							snake_case_		    =     get_character()
							if char != KEYMAP["undefined"]:
								snake_case_		    =     ord(__lowercase						)
							snake_case_		    =     cls.key_handler.get(__lowercase						)
							if handler:
								snake_case_		    =     char
								return handler(cls						)
							else:
								return None







def 						lowerCamelCase__    (		cls							):







	'''simple docstring'''





	return KeyHandler(cls.__name__     ,	cls.__bases__     ,	cls.__dict__.copy()							)






def 						lowerCamelCase__    (		_A							):







	'''simple docstring'''





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

	snake_case_		    =     [True] * (num + 1)

	snake_case_		    =     2
	while p * p <= num:
		if primes[p]:
			for i in range(p * p     ,	num + 1     ,	_A							):
				snake_case_		    =     False
		p += 1

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


if __name__ == "__main__":
		import doctest

		doctest.testmod()

		lowercase__				:     Tuple 		=						int(input("Enter a positive integer: ").strip())
		print(prime_sieve_eratosthenes(user_num))
