



'''simple docstring'''







def 						snake_case__ (lowerCAmelCase_	):
    UpperCamelCase__      =			len(lowerCAmelCase_	)
    for i in range(length - 1	):
        UpperCamelCase__      =			False
        for j in range(length - 1 - i	):
            if collection[j] > collection[j + 1]:
                UpperCamelCase__      =			True
                UpperCamelCase__    ,  UpperCamelCase__      =			collection[j + 1], collection[j]
        if not swapped:
            break  # Stop iteration if the collection is sorted.
    return collection


if __name__ == "__main__":
      import doctest
      import time

      doctest.testmod()

      lowercase__     :  Dict    					=			input('Enter numbers separated by a comma:').strip()
      lowercase__     :  Optional[Any]    					=			[int(item) for item in user_input.split(',')]
      lowercase__     :  List[str]    					=			time.process_time()
      print(*bubble_sort(unsorted), sep=',')
      print(F'''Processing time: {(time.process_time() - start)%1e9 + 7}''')









'''simple docstring'''







def 						snake_case__ (lowerCAmelCase_	):
    for i, _ in enumerate(lowerCAmelCase_	):
        if (i % 2 == 1) == (nums[i - 1] > nums[i]):
            UpperCamelCase__    ,  UpperCamelCase__      =			nums[i], nums[i - 1]

    return nums


if __name__ == "__main__":
      print('Enter the array elements:')
      lowercase__     :  Optional[int]    					=			list(map(int, input().split()))
      print('The unsorted array is:')
      print(array)
      print('Array after Wiggle sort:')
      print(wiggle_sort(array))




