'''simple docstring'''




from __future__ import annotations






def 							snake_case__				(     _A:   str ,  _A:   list[str] | None = None					)       ->      list[list[str]]:

		'''simple docstring'''


		lowerCAmelCase     =    word_bank or []
		# create a table
		lowerCAmelCase     =    len(_A					) + 1

		lowerCAmelCase     =    []
		for _ in range(_A					):
				table.append([]					)
		# seed value
		lowerCAmelCase     =    [[]]  # because empty string has empty combination

		# iterate through the indices
		for i in range(_A					):
				# condition
				if table[i] != []:
						for word in word_bank:
								# slice condition
								if target[i : i + len(_A					)] == word:
										lowerCAmelCase     =    [
										    [word, *way] for way in table[i]
										]
										# adds the word to every combination the current position holds
										# now,push that combination to the table[i+len(word)]
										table[i + len(_A					)] += new_combinations

    # combinations are in reverse order so reverse for better output
		for combination in table[len(_A					)]:
				combination.reverse()

		return table[len(_A					)]


if __name__ == "__main__":
						print(all_construct('''jwajalapa''', ['''jwa''', '''j''', '''w''', '''a''', '''la''', '''lapa''']))
						print(all_construct('''rajamati''', ['''s''', '''raj''', '''amat''', '''raja''', '''ma''', '''i''', '''t''']))
						print(
						    all_construct(
						        '''hexagonosaurus''',
						        ['''h''', '''ex''', '''hex''', '''ag''', '''ago''', '''ru''', '''auru''', '''rus''', '''go''', '''no''', '''o''', '''s'''],
						    )
						)





'''simple docstring'''




from __future__ import annotations

import math






def 							snake_case__				(     _A:   int					)       ->      list[int]:

		'''simple docstring'''


		if num <= 0:
				lowerCAmelCase     =    f"{num}: Invalid input, please enter a positive integer."
				raise ValueError(_A					)

		lowerCAmelCase     =    [True] * (num + 1)
		lowerCAmelCase     =    []
		lowerCAmelCase     =    2
		lowerCAmelCase     =    int(math.sqrt(_A					)					)

		while start <= end:
				# If start is a prime
				if sieve[start] is True:
						prime.append(_A					)

						# Set multiples of start be False
						for i in range(start * start ,  num + 1 ,  _A					):
								if sieve[i] is True:
										lowerCAmelCase     =    False

				start += 1

		for j in range(end + 1 ,  num + 1					):
				if sieve[j] is True:
						prime.append(_A					)

		return prime


if __name__ == "__main__":
						print(prime_sieve(int(input('''Enter a positive integer: ''').strip())))




