




def 	_a      (						SCREAMING_SNAKE_CASE_							:				Optional[int]     ):




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

					__lowerCAmelCase				   =       [True] * (num + 1)

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

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


if __name__ == "__main__":
					import doctest

					doctest.testmod()

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








from __future__ import annotations


class        _a							:

							def __init__(							self:	Union[str, Any]    ,						UpperCamelCase_:	str    ,						UpperCamelCase_:	str							)			->   List[Any]:





									"""simple docstring"""







									lowercase__     ,		lowercase__            =      text, pattern
									lowercase__     ,		lowercase__            =      len(UpperCamelCase_							), len(UpperCamelCase_							)

							def       lowerCamelCase_ (							self:	Optional[int]    ,						UpperCamelCase_:	str							)			->   int:





									"""simple docstring"""







									for i in range(self.patLen - 1    ,						-1    ,						-1							):
											if char == self.pattern[i]:
													return i
									return -1

							def       lowerCamelCase_ (							self:	Optional[int]    ,						UpperCamelCase_:	int							)			->   int:





									"""simple docstring"""







									for i in range(self.patLen - 1    ,						-1    ,						-1							):
											if self.pattern[i] != self.text[current_pos + i]:
													return current_pos + i
									return -1


							def       lowerCamelCase_ (							self:	List[Any]							)			->   list[int]:





									"""simple docstring"""







									lowercase__            =      []
									for i in range(self.textLen - self.patLen + 1							):
											lowercase__            =      self.mismatch_in_text(UpperCamelCase_							)
											if mismatch_index == -1:
													positions.append(UpperCamelCase_							)
											else:
													lowercase__            =      self.match_in_pattern(self.text[mismatch_index]							)
													lowercase__            =      (
													    mismatch_index - match_index
													)  # shifting index lgtm [py/multiple-definition]
									return positions
lowerCAmelCase       =							'ABAABA'
lowerCAmelCase       =							'AB'
lowerCAmelCase       =							BoyerMooreSearch(text, pattern)
lowerCAmelCase       =							bms.bad_character_heuristic()

if len(positions) == 0:
			print('No match found')
else:
			print('Pattern found in following positions: ')
			print(positions)


