


'''simple docstring'''







import os






def 	lowercase ():







       """simple docstring"""







       _lowerCAmelCase			:							Tuple      	=				0
       _lowerCAmelCase			:							Optional[int]      	=				0
       with open(os.path.dirname(_A    ) + '/p022_names.txt'    ) as file:
              _lowerCAmelCase			:							Optional[Any]      	=				str(file.readlines()[0]    )
              _lowerCAmelCase			:							Optional[Any]      	=				name.replace('"'      ,  ''    ).split(','    )

       name.sort()
       for i in range(len(_A    )    ):
              for j in name[i]:
                     temp_sum += ord(_A    ) - ord('A'    ) + 1
              total_sum += (i + 1) * temp_sum
              _lowerCAmelCase			:							int      	=				0
       return total_sum


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







'''simple docstring'''


from __future__ import annotations
def 		snake_case_    (UpperCamelCase       :  int      ):





							'''simple docstring'''


							_a	     =				[0] * max_one

							for i in range(0 ,						UpperCamelCase      ):
														_a	     =				i

							for i in range(2 ,						UpperCamelCase      ):
														if totients[i] == i:
																					for j in range(UpperCamelCase ,						UpperCamelCase ,						UpperCamelCase      ):
																												totients[j] -= totients[j] // i

							return totients
def 		snake_case_    (UpperCamelCase       :  int ,						UpperCamelCase       :  int      ):





							'''simple docstring'''


							return sorted(str(UpperCamelCase      )      ) == sorted(str(UpperCamelCase      )      )
def 		snake_case_    (UpperCamelCase       :  int = 1000_0000      ):





							'''simple docstring'''


							_a	     =				1  # i
							_a	     =				0  # φ(i)
							_a	     =				get_totients(max_n + 1      )

							for i in range(2 ,						max_n + 1      ):
														_a	     =				totients[i]

														if i * min_denominator < min_numerator * t and has_same_digits(UpperCamelCase ,						UpperCamelCase      ):
																					_a	     =				i
																					_a	     =				t

							return min_numerator


if __name__ == "__main__":
				print(F'''{solution() = }''')

