

from __future__ import annotations






def        snake_case__		(    lowerCamelCase_     ,				lowerCamelCase_     ,				lowerCamelCase_     ,				lowerCamelCase_		):
							if (direction == 1 and array[indexa] > array[indexa]) or (
							    direction == 0 and array[indexa] < array[indexa]
							):
														A      :					Optional[int]      		=					array[indexa], array[indexa]






def        snake_case__		(    lowerCamelCase_     ,				lowerCamelCase_     ,				lowerCamelCase_     ,				lowerCamelCase_		):
							if length > 1:
														A      :					int      		=					int(length / 2		)
														for i in range(lowercase_     ,				low + middle		):
																					comp_and_swap(lowercase_     ,				lowercase_     ,				i + middle     ,				lowercase_		)
														bitonic_merge(lowercase_     ,				lowercase_     ,				lowercase_     ,				lowercase_		)
														bitonic_merge(lowercase_     ,				low + middle     ,				lowercase_     ,				lowercase_		)






def        snake_case__		(    lowerCamelCase_     ,				lowerCamelCase_     ,				lowerCamelCase_     ,				lowerCamelCase_		):
							if length > 1:
														A      :					Union[str, Any]      		=					int(length / 2		)
														bitonic_sort(lowercase_     ,				lowercase_     ,				lowercase_     ,				1		)
														bitonic_sort(lowercase_     ,				low + middle     ,				lowercase_     ,				0		)
														bitonic_merge(lowercase_     ,				lowercase_     ,				lowercase_     ,				lowercase_		)


if __name__ == "__main__":
		lowercase			:				Tuple   =     input("Enter numbers separated by a comma:\n").strip()
		lowercase			:				List[Any]   =     [int(item.strip()) for item in user_input.split(",")]

		bitonic_sort(unsorted, 0, len(unsorted), 1)
		print("\nSorted array in ascending order is: ", end="")
		print(*unsorted, sep=", ")

		bitonic_merge(unsorted, 0, len(unsorted), 0)
		print("Sorted array in descending order is: ", end="")
		print(*unsorted, sep=", ")













import os




def  __UpperCAmelCase(   ):
       with open(os.path.dirname(lowercase_   ) + '''/p022_names.txt'''   ) as file:
              _lowerCamelCase				:  Optional[int]						=		str(file.readlines()[0]   )
              _lowerCamelCase				:  List[Any]						=		names.replace('''"'''			,     ''''''   ).split(''','''   )

       names.sort()

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

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

              total_score += (i + 1) * name_score
              _lowerCamelCase				:  Optional[int]						=		0
       return total_score


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

