


'''simple docstring'''







import os



def     _UpperCamelCase				(			):






				"""simple docstring"""



				with open(os.path.dirname(UpperCamelCase__		) + "/p022_names.txt"		) as file:
								__magic_name__					:       Optional[Any]    							=							str(file.readlines()[0]		)
								__magic_name__					:       Tuple    							=							names.replace("\""  , ""		).split(","		)

				names.sort()

				__magic_name__					:       Tuple    							=							0
				__magic_name__					:       Optional[int]    							=							0

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

								total_score += (i + 1) * name_score
								__magic_name__					:       Tuple    							=							0
				return total_score


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






'''simple docstring'''






class 					UpperCAmelCase	:




      def __init__(     self     :					List[str]     ,     __snake_case     :					str    )							-> Union[str, Any]:
            _lowerCAmelCase					=				val
            _lowerCAmelCase					=				None
            _lowerCAmelCase					=				None




      def 							lowercase__       (     self     :					Optional[Any]     ,     __snake_case     :					int    )							-> Optional[int]:
            if self.val:
                  if val < self.val:
                        if self.left is None:
                              _lowerCAmelCase					=				Node(__snake_case    )
                        else:
                              self.left.insert(__snake_case    )
                  elif val > self.val:
                        if self.right is None:
                              _lowerCAmelCase					=				Node(__snake_case    )
                        else:
                              self.right.insert(__snake_case    )
            else:
                  _lowerCAmelCase					=				val




def   UpperCamelCase__ (						lowerCAmelCase				,      lowerCAmelCase    ):





      """simple docstring"""


      if root:
            inorder(root.left				,      lowerCAmelCase    )
            res.append(root.val    )
            inorder(root.right				,      lowerCAmelCase    )
def   UpperCamelCase__ (						lowerCAmelCase    ):





      """simple docstring"""


      if len(lowerCAmelCase    ) == 0:
            return arr
      _lowerCAmelCase					=				Node(arr[0]    )
      for i in range(1				,      len(lowerCAmelCase    )    ):
            root.insert(arr[i]    )
      # Traverse BST in order.
      _lowerCAmelCase					=				[]
      inorder(lowerCAmelCase				,      lowerCAmelCase    )
      return res


if __name__ == "__main__":
      print(tree_sort([10, 1, 3, 2, 9, 14, 13]))






