


"""simple docstring"""


from copy import deepcopy
class     _UpperCamelCase    :
							'''simple docstring'''







							def __init__(	self       ,  __a = None       ,  __a = None      ):

										if arr is None and size is not None:
													__lowerCAmelCase							       =     size
													__lowerCAmelCase							       =     [0] * size
										elif arr is not None:
													self.init(__a      )
										else:
													raise ValueError("Either arr or size must be specified"      )

							def      snake_case							(	self       ,  __a      ):
										__lowerCAmelCase							       =     len(__a      )
										__lowerCAmelCase							       =     deepcopy(__a      )
										for i in range(1       ,  self.size      ):
													__lowerCAmelCase							       =     self.next_(__a      )
													if j < self.size:
																self.tree[j] += self.tree[i]

							def      snake_case							(	self      ):
										__lowerCAmelCase							       =     self.tree[:]
										for i in range(self.size - 1       ,  0       ,  -1      ):
													__lowerCAmelCase							       =     self.next_(__a      )
													if j < self.size:
																arr[j] -= arr[i]
										return arr

							@staticmethod
							def      snake_case							(	__a      ):
										return index + (index & (-index))

							@staticmethod
							def      snake_case							(	__a      ):
										return index - (index & (-index))

							def      snake_case							(	self       ,  __a       ,  __a      ):
										if index == 0:
													self.tree[0] += value
													return
										while index < self.size:
													self.tree[index] += value
													__lowerCAmelCase							       =     self.next_(__a      )

							def      snake_case							(	self       ,  __a       ,  __a      ):
										self.add(__a       ,  value - self.get(__a      )      )

							def      snake_case							(	self       ,  __a      ):
										if right == 0:
													return 0
										__lowerCAmelCase							       =     self.tree[0]
										right -= 1  # make right inclusive
										while right > 0:
													result += self.tree[right]
													__lowerCAmelCase							       =     self.prev(__a      )
										return result

							def      snake_case							(	self       ,  __a       ,  __a      ):
										return self.prefix(__a      ) - self.prefix(__a      )

							def      snake_case							(	self       ,  __a      ):
										return self.query(__a       ,  index + 1      )



							def      snake_case							(	self       ,  __a      ):
										value -= self.tree[0]
										if value < 0:
													return -1

										__lowerCAmelCase							       =     1  # Largest power of 2 <= size
										while j * 2 < self.size:
													j *= 2

										__lowerCAmelCase							       =     0

										while j > 0:
													if i + j < self.size and self.tree[i + j] <= value:
																value -= self.tree[i + j]
																i += j
													j //= 2
										return i


if __name__ == "__main__":
	import doctest

	doctest.testmod()








"""simple docstring"""


def _lowerCamelCase      (						_UpperCamelCase ):

			'''simple docstring'''




			__lowerCAmelCase							       =     False
			while is_sorted is False:  # Until all the indices are traversed keep looping
						__lowerCAmelCase							       =     True
						for i in range(0       ,					len(_UpperCamelCase ) - 1       ,					2 ):  # iterating over all even indices
									if input_list[i] > input_list[i + 1]:
												__lowerCAmelCase       ,      __lowerCAmelCase							       =     input_list[i + 1], input_list[i]
												# swapping if elements not in order
												__lowerCAmelCase							       =     False

						for i in range(1       ,					len(_UpperCamelCase ) - 1       ,					2 ):  # iterating over all odd indices
									if input_list[i] > input_list[i + 1]:
												__lowerCAmelCase       ,      __lowerCAmelCase							       =     input_list[i + 1], input_list[i]
												# swapping if elements not in order
												__lowerCAmelCase							       =     False
			return input_list


if __name__ == "__main__":
	print("Enter list to be sorted")
	A	:  Tuple            =     [int(x) for x in input().split()]
	# inputing elements of the list in one line
	A	:  Dict            =     odd_even_sort(input_list)
	print("The sorted list is")
	print(sorted_list)




