





UpperCAmelCase     :     Tuple							=	0  # The first color of the flag.
UpperCAmelCase     :     Optional[int]							=	1  # The second color of the flag.
UpperCAmelCase     :     List[Any]							=	2  # The third color of the flag.
UpperCAmelCase     :     str							=	(red, white, blue)
def 					_A	(		SCREAMING_SNAKE_CASE					:       list						):





  """simple docstring"""



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


if __name__ == "__main__":
     import doctest

     doctest.testmod()

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













import random
from typing import Any
def 					_A	(		SCREAMING_SNAKE_CASE					:       list						):





  """simple docstring"""



  for _ in range(len(SCREAMING_SNAKE_CASE						)						):
    a__     : Tuple  =random.randint(0	,	len(SCREAMING_SNAKE_CASE						) - 1						)
    a__     : Any  =random.randint(0	,	len(SCREAMING_SNAKE_CASE						) - 1						)
    a__ ,							a__     : Tuple  =data[b], data[a]
  return data


if __name__ == "__main__":
     UpperCAmelCase     :     Dict							=	[0, 1, 2, 3, 4, 5, 6, 7]
     UpperCAmelCase     :     Optional[Any]							=	["""python""", """says""", """hello""", """!"""]
     print("""Fisher-Yates Shuffle:""")
     print("""List""", integers, strings)
     print("""FY Shuffle""", fisher_yates_shuffle(integers), fisher_yates_shuffle(strings))






