



"""simple docstring"""






from __future__ import annotations






def   snake_case__     (	__lowerCamelCase       :					Optional[int]			):
			"""simple docstring"""
			create_state_space_tree(lowerCamelCase_							,	[]							,	0							,	[0 for i in range(len(lowerCamelCase_			)			)]			)






def   snake_case__     (	__lowerCamelCase       :					Tuple							,	__lowerCamelCase       :					str							,	__lowerCamelCase       :					List[Any]							,	__lowerCamelCase       :					Dict							,	):
			"""simple docstring"""

			if index == len(lowerCamelCase_			):
						print(lowerCamelCase_			)
						return

			for i in range(len(lowerCamelCase_			)			):
						if not index_used[i]:
									current_sequence.append(sequence[i]			)
									lowerCamelCase__	:	List[str]				=True
									create_state_space_tree(lowerCamelCase_							,	lowerCamelCase_							,	index + 1							,	lowerCamelCase_			)
									current_sequence.pop()
									lowerCamelCase__	:	Dict				=False
_lowercase				:				Any   		=		[3, 1, 2, 4]
generate_all_permutations(sequence)

_lowercase				:				int   		=		["A", "B", "C"]

generate_all_permutations(sequence_a)









"""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())




