



'''simple docstring'''





from __future__ import annotations




def lowerCAmelCase						(__A						,			__A						,			__A						,			__A):



     """simple docstring"""



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




def lowerCAmelCase						(__A						,			__A						,			__A						,			__A):



     """simple docstring"""



     if length > 1:
          _a											=						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 lowerCAmelCase						(__A						,			__A						,			__A						,			__A):



     """simple docstring"""



     if length > 1:
          _a											=						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__":
  lowercase_	 =						input("Enter numbers separated by a comma:\n").strip()
  lowercase_	 =						[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=", ")








'''simple docstring'''





# This is the module that test_patching.py uses to test patch_submodule()

import os  # noqa: this is just for tests
import os as renamed_os  # noqa: this is just for tests
from os import path  # noqa: this is just for tests
from os import path as renamed_path  # noqa: this is just for tests
from os.path import join  # noqa: this is just for tests
from os.path import join as renamed_join  # noqa: this is just for tests


lowercase_	 =						open  # noqa: we just need to have a builtin inside this module to test it properly



