'''simple docstring'''




__lowercase        =    0  # The first color of the flag.
__lowercase        =    1  # The second color of the flag.
__lowercase        =    2  # The third color of the flag.
__lowercase        =    (red, white, blue)






def 							snake_case__				(     _A:   list					)       ->      list:

		'''simple docstring'''


		if not sequence:
				return []
		if len(_A					) == 1:
				return list(_A					)
		lowerCAmelCase     =    0
		lowerCAmelCase     =    len(_A					) - 1
		lowerCAmelCase     =    0
		while mid <= high:
				if sequence[mid] == colors[0]:
						lowerCAmelCase   ,	lowerCAmelCase     =    sequence[mid], sequence[low]
						low += 1
						mid += 1
				elif sequence[mid] == colors[1]:
						mid += 1
				elif sequence[mid] == colors[2]:
						lowerCAmelCase   ,	lowerCAmelCase     =    sequence[high], sequence[mid]
						high -= 1
				else:
						lowerCAmelCase     =    f"The elements inside the sequence must contains only {colors} values"
						raise ValueError(_A					)
		return sequence


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						__lowercase        =    input('''Enter numbers separated by commas:\n''').strip()
						__lowercase        =    [int(item.strip()) for item in user_input.split(''',''')]
						print(f'{dutch_national_flag_sort(unsorted)}')





'''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())))




