



"""simple docstring"""






_lowercase				:				str   		=		0  # The first color of the flag.
_lowercase				:				Dict   		=		1  # The second color of the flag.
_lowercase				:				Tuple   		=		2  # The third color of the flag.
_lowercase				:				Optional[int]   		=		(red, white, blue)






def   snake_case__     (	__lowerCamelCase       :					list			):
			"""simple docstring"""
			if not sequence:
						return []
			if len(__lowerCamelCase			) == 1:
						return list(__lowerCamelCase			)
			lowerCamelCase__	:	List[Any]				=0
			lowerCamelCase__	:	Dict				=len(__lowerCamelCase			) - 1
			lowerCamelCase__	:	Tuple				=0
			while mid <= high:
						if sequence[mid] == colors[0]:
									lowerCamelCase__	:	Optional[Any]				=sequence[mid], sequence[low]
									low += 1
									mid += 1
						elif sequence[mid] == colors[1]:
									mid += 1
						elif sequence[mid] == colors[2]:
									lowerCamelCase__	:	Union[str, Any]				=sequence[high], sequence[mid]
									high -= 1
						else:
									lowerCamelCase__	:	Dict				=f'''The elements inside the sequence must contains only {colors} values'''
									raise ValueError(__lowerCamelCase			)
			return sequence


if __name__ == "__main__":
		import doctest

		doctest.testmod()

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









"""simple docstring"""






import os






def   snake_case__     (	):
			"""simple docstring"""
			with open(os.path.dirname(__lowerCamelCase			) + '''/p022_names.txt'''			) as file:
						lowerCamelCase__	:	Tuple				=str(file.readlines()[0]			)
						lowerCamelCase__	:	int				=names.replace('''"'''							,	''''''			).split(''','''			)

			names.sort()

			lowerCamelCase__	:	Union[str, Any]				=0
			lowerCamelCase__	:	str				=0

			for i, name in enumerate(__lowerCamelCase			):
						for letter in name:
									name_score += ord(__lowerCamelCase			) - 64

						total_score += (i + 1) * name_score
						lowerCamelCase__	:	Dict				=0
			return total_score


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




