

"""simple docstring"""




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

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


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




class     __UpperCAmelCase							:


     """simple docstring"""


     def __init__(	self  ,       __A    ):
        __a					=  set_counts
        __a					=  max(__A    )
        __a					=  len(__A    )
        __a					=  [1] * num_sets
        __a					=  list(range(__A    )    )


     def 	snake_case_  (	self  ,       __A  ,       __A    ):
        __a					=  self.get_parent(__A    )
        __a					=  self.get_parent(__A    )

        if src_parent == dst_parent:
           return False

        if self.ranks[dst_parent] >= self.ranks[src_parent]:
           self.set_counts[dst_parent] += self.set_counts[src_parent]
           __a					=  0
           __a					=  dst_parent
           if self.ranks[dst_parent] == self.ranks[src_parent]:
              self.ranks[dst_parent] += 1
           __a					=  self.set_counts[dst_parent]
        else:
           self.set_counts[src_parent] += self.set_counts[dst_parent]
           __a					=  0
           __a					=  src_parent
           __a					=  self.set_counts[src_parent]

        __a					=  max(self.max_set  ,       __A    )
        return True


     def 	snake_case_  (	self  ,       __A    ):
        if self.parents[disj_set] == disj_set:
           return disj_set
        __a					=  self.get_parent(self.parents[disj_set]    )
        return self.parents[disj_set]



