





"""simple docstring"""




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





def 						UpperCAmelCase__		(     _UpperCAmelCase					):






  """simple docstring"""





  if not sequence:
    return []
  if len(_UpperCAmelCase					) == 1:
    return list(_UpperCAmelCase					)
  A_  :       str										=  0
  A_  :       Optional[int]										=  len(_UpperCAmelCase					) - 1
  A_  :       Optional[Any]										=  0
  while mid <= high:
    if sequence[mid] == colors[0]:
      A_						,       A_  :       Union[str, Any]										=  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_  :       int										=  f"""The elements inside the sequence must contains only {colors} values"""
      raise ValueError(_UpperCAmelCase					)
  return sequence


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   lowerCamelCase_     :						Dict						=					input('Enter numbers separated by commas:\n').strip()
   lowerCamelCase_     :						List[str]						=					[int(item.strip()) for item in user_input.split(',')]
   print(F"{dutch_national_flag_sort(unsorted)}")






"""simple docstring"""




import os

# Precomputes a list of the 100 first triangular numbers
lowerCamelCase_     :						List[str]						=					[int(0.5 * n * (n + 1)) for n in range(1, 1_01)]





def 						UpperCAmelCase__		(     ):






  """simple docstring"""





  A_  :       Union[str, Any]										=  os.path.dirname(os.path.realpath(_UpperCAmelCase					)					)
  A_  :       Tuple										=  os.path.join(_UpperCAmelCase ,					'words.txt'					)

  A_  :       List[Any]										=  ''
  with open(_UpperCAmelCase					) as f:
    A_  :       int										=  f.readline()

  A_  :       Optional[Any]										=  [word.strip('"'					) for word in words.strip('\r\n'					).split(','					)]
  A_  :       Dict										=  [
      word
      for word in [sum(ord(_UpperCAmelCase					) - 64 for x in word					) for word in words]
      if word in TRIANGULAR_NUMBERS
  ]
  return len(_UpperCAmelCase					)


if __name__ == "__main__":
   print(solution())