



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

					return nums


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





'''simple docstring'''







def  SCREAMING_SNAKE_CASE__ (				SCREAMING_SNAKE_CASE     ):
		for i, _ in enumerate(SCREAMING_SNAKE_CASE     ):
				if (i % 2 == 1) == (nums[i - 1] > nums[i]):
						SCREAMING_SNAKE_CASE_						,		SCREAMING_SNAKE_CASE_						:Dict										=      nums[i], nums[i - 1]

		return nums


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