
__lowerCAmelCase     :	dict[str, float]       			=  {
    "joule": 1.0,
    "kilojoule": 1000,
    "megajoule": 1000000,
    "gigajoule": 1000000000,
    "wattsecond": 1.0,
    "watthour": 3600,
    "kilowatthour": 3600000,
    "newtonmeter": 1.0,
    "calorie_nutr": 4186.8,
    "kilocalorie_nutr": 4186800.00,
    "electronvolt": 1.6_0217_6634e-19,
    "britishthermalunit_it": 1055.05585,
    "footpound": 1.35_5818,
}

def a__       (			A_,	A_,	A_   ):






  '''simple docstring'''





  if to_type not in ENERGY_CONVERSION or from_type not in ENERGY_CONVERSION:
    __magic_name__								=			(
        f'''Incorrect \'from_type\' or \'to_type\' value: {from_type!r}, {to_type!r}\n'''
        f'''Valid values are: {', '.join(A_   )}'''
    )
    raise ValueError(A_   )
  return value * ENERGY_CONVERSION[from_type] / ENERGY_CONVERSION[to_type]


if __name__ == "__main__":
    import doctest

    doctest.testmod()



from __future__ import annotations

def a__       (			A_,	A_,	A_,	A_   ):






  '''simple docstring'''





  if (direction == 1 and array[indexa] > array[indexa]) or (
      direction == 0 and array[indexa] < array[indexa]
  ):
    __magic_name__	,       __magic_name__								=			array[indexa], array[indexa]

def a__       (			A_,	A_,	A_,	A_   ):






  '''simple docstring'''





  if length > 1:
    __magic_name__								=			int(length / 2   )
    for i in range(A_,	low + middle   ):
      comp_and_swap(A_,	A_,	i + middle,	A_   )
    bitonic_merge(A_,	A_,	A_,	A_   )
    bitonic_merge(A_,	low + middle,	A_,	A_   )

def a__       (			A_,	A_,	A_,	A_   ):






  '''simple docstring'''





  if length > 1:
    __magic_name__								=			int(length / 2   )
    bitonic_sort(A_,	A_,	A_,	1   )
    bitonic_sort(A_,	low + middle,	A_,	0   )
    bitonic_merge(A_,	A_,	A_,	A_   )


if __name__ == "__main__":
    __lowerCAmelCase     :	Optional[Any]       			=  input('Enter numbers separated by a comma:\n').strip()
    __lowerCAmelCase     :	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=', ')

