




'''simple docstring'''



UpperCAmelCase_							:	List[Any]	     =		{
    0: '''0''',
    1: '''1''',
    2: '''2''',
    3: '''3''',
    4: '''4''',
    5: '''5''',
    6: '''6''',
    7: '''7''',
    8: '''8''',
    9: '''9''',
    1_0: '''a''',
    1_1: '''b''',
    1_2: '''c''',
    1_3: '''d''',
    1_4: '''e''',
    1_5: '''f''',
}







def       _UpperCamelCase			(_lowerCamelCase				:  float						)-> str:




     '''simple docstring'''





     assert type(_lowerCamelCase						) in (int, float) and decimal == int(_lowerCamelCase						)
     __snake_case            =	int(_lowerCamelCase						)
     __snake_case            =	''''''
     __snake_case            =	False
     if decimal < 0:
          __snake_case            =	True
          decimal *= -1
     while decimal > 0:
          __snake_case       ,     __snake_case            =	divmod(_lowerCamelCase ,						16						)
          __snake_case            =	values[remainder] + hexadecimal
     __snake_case            =	'''0x''' + hexadecimal
     if negative:
          __snake_case            =	'''-''' + hexadecimal
     return hexadecimal


if __name__ == "__main__":
     import doctest

     doctest.testmod()







'''simple docstring'''

from __future__ import annotations







def __UpperCamelCase( _A       :					list[int]	,      _A       :					int	,      _A       :					int	,      _A       :					int     ):
   '''simple docstring'''
   if (direction == 1 and array[indexa] > array[indexa]) or (
       direction == 0 and array[indexa] < array[indexa]
   ):
      UpperCAmelCase__					,   UpperCAmelCase__				:					Union[str, Any] 					=	array[indexa], array[indexa]







def __UpperCamelCase( _A       :					list[int]	,      _A       :					int	,      _A       :					int	,      _A       :					int     ):
   '''simple docstring'''
   if length > 1:
      UpperCAmelCase__				:					List[Any] 					=	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 __UpperCamelCase( _A       :					list[int]	,      _A       :					int	,      _A       :					int	,      _A       :					int     ):
   '''simple docstring'''
   if length > 1:
      UpperCAmelCase__				:					Optional[int] 					=	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__":
  UpperCamelCase__  :						Dict					=      input('Enter numbers separated by a comma:\n').strip()
  UpperCamelCase__  :						Tuple					=      [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=', ')




