





__lowercase       :Optional[int]       =  0  # The first color of the flag.
__lowercase       :Union[str, Any]       =  1  # The second color of the flag.
__lowercase       :List[str]       =  2  # The third color of the flag.
__lowercase       :Optional[Any]       =  (red, white, blue)







def       UpperCAmelCase							(     _lowerCamelCase      :  list     ):





						'''simple docstring'''


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


if __name__ == "__main__":
				import doctest

				doctest.testmod()

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






from __future__ import annotations







def       UpperCAmelCase							(     _lowerCamelCase      :  list[int]			,   _lowerCamelCase      :  int     ):





						'''simple docstring'''


						if len(_lowerCamelCase     ) < k or k < 0:
												raise ValueError("Invalid Input"     )
						SCREAMING_SNAKE_CASE__     :				int   =					sum(array[:k]     )
						for i in range(len(_lowerCamelCase     ) - k     ):
												SCREAMING_SNAKE_CASE__     :				str   =					current_sum - array[i] + array[i + k]
												SCREAMING_SNAKE_CASE__     :				Union[str, Any]   =					max(_lowerCamelCase			,   _lowerCamelCase     )
						return max_sum


if __name__ == "__main__":
				from doctest import testmod
				from random import randint

				testmod()
				__lowercase       :List[str]       =  [randint(-1_000, 1_000) for i in range(100)]
				__lowercase       :Any       =  randint(0, 110)
				print(f"The maximum sum of {k} consecutive elements is {max_sum_in_array(array,k)}")