"""simple docstring"""




import os







def 				_UpperCAmelCase		(							):





		"""simple docstring"""




		with open(os.path.dirname(lowerCamelCase__  ) + """/p022_names.txt"""  ) as file:
				lowerCAmelCase__   = str(file.readlines()[0]  )
				lowerCAmelCase__   = names.replace("""\""""      ,	""""""  ).split(""","""  )

		names.sort()

		lowerCAmelCase__   = 0
		lowerCAmelCase__   = 0

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

				total_score += (i + 1) * name_score
				lowerCAmelCase__   = 0
		return total_score


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





"""simple docstring"""




def 				_UpperCAmelCase		(							lowerCamelCase__  ):





		"""simple docstring"""




		return " ".join(
		    """""".join(word[::-1]  ) if len(lowerCamelCase__  ) > 4 else word for word in sentence.split()  )


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			print(reverse_long_words("Hey wollef sroirraw"))




