





'''simple docstring'''




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






def 			_lowerCAmelCase     (    __snake_case    :					list     )	->	list:
     if not sequence:
          return []
     if len(__snake_case     ) == 1:
          return list(__snake_case     )
     __A		:					str						=			0
     __A		:					Tuple						=			len(__snake_case     ) - 1
     __A		:					int						=			0
     while mid <= high:
          if sequence[mid] == colors[0]:
               __A					,__A		:					Dict						=			sequence[mid], sequence[low]
               low += 1
               mid += 1
          elif sequence[mid] == colors[1]:
               mid += 1
          elif sequence[mid] == colors[2]:
               __A					,__A		:					str						=			sequence[high], sequence[mid]
               high -= 1
          else:
               __A		:					Dict						=			f'The elements inside the sequence must contains only {colors} values'
               raise ValueError(__snake_case     )
     return sequence


if __name__ == "__main__":
  import doctest

  doctest.testmod()

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






'''simple docstring'''




import math
import sys






def 			_lowerCAmelCase     (    __snake_case    :					int     )	->	int:
     if number != int(__snake_case     ):
          raise ValueError('the value of input must be a natural number'     )
     if number < 0:
          raise ValueError('the value of input must not be a negative number'     )
     if number == 0:
          return 1
     __A		:					str						=			[-1] * (number + 1)
     __A		:					Dict						=			0
     for i in range(1					,				number + 1     ):
          __A		:					int						=			sys.maxsize
          __A		:					int						=			int(math.sqrt(__snake_case     )     )
          for j in range(1					,				root + 1     ):
               __A		:					str						=			1 + answers[i - (j**2)]
               __A		:					Dict						=			min(__snake_case					,				__snake_case     )
          __A		:					Union[str, Any]						=			answer
     return answers[number]


if __name__ == "__main__":
  import doctest

  doctest.testmod()